diff --git a/src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGridItemSharedButton.tsx b/src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGridItemSharedButton.tsx index 60c0528a..8727602d 100644 --- a/src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGridItemSharedButton.tsx +++ b/src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGridItemSharedButton.tsx @@ -1,9 +1,4 @@ -<<<<<<< HEAD -import { Button } from '@openfun/cunningham-react'; -import { useMemo } from 'react'; -======= import { Button, Tooltip } from '@openfun/cunningham-react'; ->>>>>>> 70048328d1b3226c4b0c8f9d93ec6c65b839c30d import { useTranslation } from 'react-i18next'; import { Box, Icon, Text } from '@/components'; @@ -15,67 +10,6 @@ type Props = { handleClick: () => void; }; export const DocsGridItemSharedButton = ({ doc, handleClick }: Props) => { -<<<<<<< HEAD - const isPublic = doc.link_reach === LinkReach.PUBLIC; - const isAuthenticated = doc.link_reach === LinkReach.AUTHENTICATED; - const isRestricted = doc.link_reach === LinkReach.RESTRICTED; - const sharedCount = doc.nb_accesses - 1; - const isShared = sharedCount > 0; - const { t } = useTranslation(); - - const { icon, label } = useMemo(() => { - if (isPublic) { - return { - icon: 'public', - label: 'Anyone with the link can see the document', - }; - } - if (isAuthenticated) { - return { - icon: 'corporate_fare', - label: - 'Anyone with the link can view the document if they are logged in', - }; - } - if (isRestricted) { - return { icon: 'group', label: 'Only invited people can access' }; - } - - return { icon: 'undefined', label: '' }; - }, [isPublic, isAuthenticated, isRestricted]); - - if (!icon) { - return null; - } - - if (!doc.abilities.accesses_view) { - return ( - - - - ); - } - - return ( -