Skip to content

Commit

Permalink
fix error back button
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeLoup committed Mar 19, 2024
1 parent 34dfffe commit edb02d2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/pages/admin/newportal/contenulibre/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { StepsButton } from 'src/components/StepsButtons';
import { ActivityContext } from 'src/contexts/activityContext';
import { UserContext } from 'src/contexts/userContext';
import { VillageContext } from 'src/contexts/villageContext';
import BackArrow from 'src/svg/back-arrow.svg';
import { ActivityType } from 'types/activity.type';
import { UserType } from 'types/user.type';

Expand All @@ -17,6 +18,15 @@ const ContenuLibre = () => {

const isModerator = user !== null && user.type <= UserType.MEDIATOR;

const backButton = () => {
return (
<a href="/admin/newportal/create" style={{ cursor: 'pointer', display: 'flex', alignItems: 'center' }}>

Check warning on line 23 in src/pages/admin/newportal/contenulibre/index.tsx

View workflow job for this annotation

GitHub Actions / lint

Do not use an `<a>` element to navigate to `/admin/newportal/create/`. Use `<Link />` from `next/link` instead. See: https://nextjs.org/docs/messages/no-html-link-for-pages
<BackArrow />
<h1 style={{ marginLeft: '10px' }}>Créer du contenu libre</h1>
</a>
);
};

const onNext = () => {
const success = createNewActivity(ActivityType.CONTENU_LIBRE, selectedPhase);
if (success) {
Expand All @@ -32,7 +42,7 @@ const ContenuLibre = () => {
<Base hideLeftNav>
<div style={{ width: '100%', padding: '0.5rem 1rem 1rem 1rem' }}>
<div className="width-900">
<h1 style={{ marginTop: '0.5rem' }}>Publication de contenu libre</h1>
{backButton()}
<p className="text">
Dans cette activité, nous vous proposons de créer une publication libre. Vous pourrez ensuite partager cette publication et décider de
l&apos;épingler dans le fil d&apos;actualité.
Expand Down

0 comments on commit edb02d2

Please sign in to comment.