diff --git a/src/pages/contenu-libre/2.tsx b/src/pages/contenu-libre/2.tsx index 9cada87ec..1eeda6221 100644 --- a/src/pages/contenu-libre/2.tsx +++ b/src/pages/contenu-libre/2.tsx @@ -18,6 +18,7 @@ import { LightBox } from 'src/components/lightbox/Lightbox'; import { ActivityContext } from 'src/contexts/activityContext'; import { UserContext } from 'src/contexts/userContext'; import { primaryColor } from 'src/styles/variables.const'; +import { UserType } from 'types/user.type'; const ContenuLibre = () => { const router = useRouter(); @@ -26,6 +27,7 @@ const ContenuLibre = () => { const [selectedImageUrl, setSelectedImageUrl] = React.useState(undefined); const [isAllImagesModalOpen, setIsAllImagesModalOpen] = React.useState(false); const [isImageModalOpen, setIsImageModalOpen] = React.useState(false); + const isTeacher = user !== null && user.type === UserType.TEACHER; const data = (activity?.data as FreeContentData) || null; const errorSteps = React.useMemo(() => { @@ -103,14 +105,18 @@ const ContenuLibre = () => { }} style={{ width: '100%', marginBottom: '1rem' }} /> -
- Épingler la publication ? - -
-
- Publier sous votre nom la publication ? (Pas Pélico) - -
+ {!isTeacher && ( + <> +
+ Épingler la publication ? + +
+
+ Publier sous votre nom la publication ? (Pas Pélico) + +
+ + )}

Image à la une :