Skip to content

Commit

Permalink
fix: remove old redirection fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jonat75 committed Jan 29, 2025
1 parent eb66f7d commit fa42346
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 55 deletions.
25 changes: 0 additions & 25 deletions packages/app/src/app/(default)/login/LoginRedirect.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions packages/app/src/app/(default)/login/RegisterRedirect.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions packages/app/src/app/(default)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { getServerSession } from "next-auth";
import { EmailLogin } from "./EmailLogin";
import { GithubLogin } from "./GithubLogin";
import { ProConnectLogin } from "./ProConnectLogin";
import { RegisterRedirect } from "./RegisterRedirect";

const title = "Connexion";

Expand Down Expand Up @@ -43,7 +42,6 @@ const LoginPage = async ({ searchParams }: NextServerPageProps<never, "callbackU

return (
<CenteredContainer py="6w">
<RegisterRedirect callbackUrl={callbackUrl} />
<h1>{title}</h1>
{session?.user ? (
<Alert severity="success" title={session?.user.email} description="Vous êtes déjà connecté·e." />
Expand Down
7 changes: 2 additions & 5 deletions packages/app/src/app/(default)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import { authConfig } from "@api/core-domain/infra/auth/config";
import ButtonsGroup from "@codegouvfr/react-dsfr/ButtonsGroup";
import Card from "@codegouvfr/react-dsfr/Card";
import { Box, Container, Grid, GridCol, Heading, ImgHome } from "@design-system";
import { getServerSession } from "next-auth";

import styles from "./index.module.css";
import { LoginRedirect } from "./login/LoginRedirect";

export const dynamic = "force-static";

const Home = async () => {
const session = await getServerSession(authConfig);
return (
<>
<LoginRedirect session={session} />
<Box pt="9w" pb="4w" className={styles.hero}>
<Container>
<Grid haveGutters>
Expand Down

0 comments on commit fa42346

Please sign in to comment.