diff --git a/src/frontend/apps/impress/src/pages/teams/[id].tsx b/src/frontend/apps/impress/src/pages/teams/[id].tsx deleted file mode 100644 index 902b3131..00000000 --- a/src/frontend/apps/impress/src/pages/teams/[id].tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { Loader } from '@openfun/cunningham-react'; -import { useRouter as useNavigate } from 'next/navigation'; -import { useRouter } from 'next/router'; -import { ReactElement } from 'react'; - -import { Box } from '@/components'; -import { TextErrors } from '@/components/TextErrors'; -import { MemberGrid } from '@/features/members'; -import { Role, TeamInfo, TeamLayout, useTeam } from '@/features/teams/'; -import { NextPageWithLayout } from '@/types/next'; - -const Page: NextPageWithLayout = () => { - const { - query: { id }, - } = useRouter(); - - if (typeof id !== 'string') { - throw new Error('Invalid team id'); - } - - return ; -}; - -interface TeamProps { - id: string; -} - -const Team = ({ id }: TeamProps) => { - const { data: team, isLoading, isError, error } = useTeam({ id }); - const navigate = useNavigate(); - - if (isError && error) { - if (error.status === 404) { - navigate.replace(`/404`); - return null; - } - - return ; - } - - if (isLoading || !team) { - return ( - - - - ); - } - - const currentRole = team.abilities.delete - ? Role.OWNER - : team.abilities.manage_accesses - ? Role.ADMIN - : Role.MEMBER; - - return ( - <> - - - - ); -}; - -Page.getLayout = function getLayout(page: ReactElement) { - return {page}; -}; - -export default Page; diff --git a/src/frontend/apps/impress/src/pages/teams/create.tsx b/src/frontend/apps/impress/src/pages/teams/create.tsx deleted file mode 100644 index 1ce18ac8..00000000 --- a/src/frontend/apps/impress/src/pages/teams/create.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { ReactElement } from 'react'; - -import { Box } from '@/components'; -import { CardCreateTeam, TeamLayout } from '@/features/teams/'; -import { NextPageWithLayout } from '@/types/next'; - -const Page: NextPageWithLayout = () => { - return ( - - - - ); -}; - -Page.getLayout = function getLayout(page: ReactElement) { - return {page}; -}; - -export default Page; diff --git a/src/frontend/apps/impress/src/pages/teams/index.tsx b/src/frontend/apps/impress/src/pages/teams/index.tsx deleted file mode 100644 index 78583aa9..00000000 --- a/src/frontend/apps/impress/src/pages/teams/index.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { Button } from '@openfun/cunningham-react'; -import type { ReactElement } from 'react'; -import { useTranslation } from 'react-i18next'; -import styled from 'styled-components'; - -import { Box, StyledLink } from '@/components'; -import { TeamLayout } from '@/features/teams/'; -import { NextPageWithLayout } from '@/types/next'; - -const StyledButton = styled(Button)` - width: fit-content; -`; - -const Page: NextPageWithLayout = () => { - const { t } = useTranslation(); - - return ( - - - {t('Create a new team')} - - - ); -}; - -Page.getLayout = function getLayout(page: ReactElement) { - return {page}; -}; - -export default Page;