From ecd06560c6dab354b0c42249ee7af31ebfd8ed95 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Thu, 10 Apr 2025 09:58:13 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A(frontend)=20Display=20homepage=20o?= =?UTF-8?q?n=20/home=20url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The homepage is now accessible at the /home URL. Before the homepage was accessible on the /login URL. We still keep the /login URL for backward compatibility. --- .../apps/impress/src/features/auth/components/Auth.tsx | 6 +++--- src/frontend/apps/impress/src/pages/home/index.tsx | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 src/frontend/apps/impress/src/pages/home/index.tsx diff --git a/src/frontend/apps/impress/src/features/auth/components/Auth.tsx b/src/frontend/apps/impress/src/features/auth/components/Auth.tsx index 87023c80..2cf007e5 100644 --- a/src/frontend/apps/impress/src/features/auth/components/Auth.tsx +++ b/src/frontend/apps/impress/src/features/auth/components/Auth.tsx @@ -43,7 +43,7 @@ export const Auth = ({ children }: PropsWithChildren) => { */ if (!authenticated && !pathAllowed) { if (config?.FRONTEND_HOMEPAGE_FEATURE_ENABLED) { - void replace('/login'); + void replace('/home'); } else { gotoLogin(); } @@ -55,9 +55,9 @@ export const Auth = ({ children }: PropsWithChildren) => { } /** - * If the user is authenticated and the path is the login page, we redirect to the home page. + * If the user is authenticated and the path is the home page, we redirect to the index. */ - if (pathname === '/login' && authenticated) { + if (pathname === '/home' && authenticated) { void replace('/'); return ( diff --git a/src/frontend/apps/impress/src/pages/home/index.tsx b/src/frontend/apps/impress/src/pages/home/index.tsx new file mode 100644 index 00000000..dca21233 --- /dev/null +++ b/src/frontend/apps/impress/src/pages/home/index.tsx @@ -0,0 +1,8 @@ +import { HomeContent } from '@/features/home'; +import { NextPageWithLayout } from '@/types/next'; + +const Page: NextPageWithLayout = () => { + return ; +}; + +export default Page;