Skip to content

Commit

Permalink
update url
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeLoup authored and Neo-Ryo committed Apr 10, 2024
1 parent 0a6e0dc commit edc651b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/activities/StepsNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface StepsNavigationProps {
const StepsNavigation: React.FC<StepsNavigationProps> = ({ currentStep, errorSteps }) => (
<Steps
steps={['Contenu', 'Forme', 'Prévisualiser']}
urls={['/admin/newportal/contenulibre', '/admin/newportal/contenulibre/2', '/admin/newportal/contenulibre/3']}
urls={['/admin/newportal/contenulibre/1?edit', '/admin/newportal/contenulibre/2', '/admin/newportal/contenulibre/3']}
activeStep={currentStep}
errorSteps={errorSteps}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/admin/newportal/contenulibre/1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const ContenuLibreStep1: React.FC = () => {

useEffect(() => {
if (activity === null && !('activity-id' in router.query) && !sessionStorage.getItem('activity')) {
router.push('/admin/newportal/contenulibre');
router.push('/admin/newportal/contenulibre/1');
} else if (activity && !isFreeContent(activity)) {
router.push('/admin/newportal/contenulibre');
router.push('/admin/newportal/contenulibre/1');
}
}, [activity, router]);

Expand Down
4 changes: 2 additions & 2 deletions src/pages/admin/newportal/contenulibre/2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const ContenuLibre = () => {

React.useEffect(() => {
if (!activity || !isFreeContent(activity)) {
router.push('/admin/newportal/contenulibre');
router.push('/admin/newportal/contenulibre/1');
}
}, [activity, router]);

Expand Down Expand Up @@ -152,7 +152,7 @@ const ContenuLibre = () => {
<h2 style={{ margin: '1rem 0 0.5rem 0' }}>Aperçu de votre publication</h2>
<p className="text">Voilà à quoi ressemblera votre publication dans le fil d&apos;activité</p>
<ActivityCard activity={activity} user={user} noButtons />
<StepsButton prev="/admin/newportal/contenulibre" next={onNext} />
<StepsButton prev="/admin/newportal/contenulibre/1" next={onNext} />
</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions src/pages/admin/newportal/contenulibre/3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ const ContenuLibre = () => {

React.useEffect(() => {
if (!activity) {
router.push('/admin/newportal/contenulibre');
router.push('/admin/newportal/contenulibre/1');
return;
}
if (!isFreeContent(activity)) {
router.push('/admin/newportal/contenulibre');
router.push('/admin/newportal/contenulibre/1');
}
}, [activity, router]);

Expand Down Expand Up @@ -100,7 +100,7 @@ const ContenuLibre = () => {
<div className={classNames('preview-block', { 'preview-block--warning': errorSteps.includes(0) })}>
<EditButton
onClick={() => {
router.push('/admin/newportal/contenulibre');
router.push('/admin/newportal/contenulibre/1');
}}
status={errorSteps.includes(0) ? 'warning' : 'success'}
style={{ position: 'absolute', top: '0.5rem', right: '0.5rem' }}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/admin/newportal/create/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ const Creer = () => {
const handleNewActivity = () => {
const success = createNewActivity(ActivityType.CONTENU_LIBRE, selectedPhase);
if (success) {
router.push('/admin/newportal/contenulibre');
router.push('/admin/newportal/contenulibre/1');
}
};

const links: Link[] = [
{ name: 'Créer du contenu libre', link: '/admin/newportal/contenulibre', action: handleNewActivity },
{ name: 'Créer du contenu libre', link: '/admin/newportal/contenulibre/1', action: handleNewActivity },
{ name: 'Créer une activité H5P', link: 'https://' },
{ name: 'Paramétrer l’hymne', link: 'https://' },
{ name: 'Mixer l’hymne', link: 'https://' },
Expand Down
4 changes: 0 additions & 4 deletions src/styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ body {
}
.container-admin-portal {
padding: 0 50px !important;
<<<<<<< HEAD
min-height: 100vh;
=======
height: 100%;
>>>>>>> e94d2bec (fix errors)
@media screen and (min-width: 1600px) {
padding: 0 15% !important;
}
Expand Down

0 comments on commit edc651b

Please sign in to comment.