🚚(frontend) Display homepage on /home url

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.
This commit is contained in:
Anthony LC
2025-04-10 09:58:13 +02:00
committed by Manuel Raynaud
parent e9ab099ce0
commit ecd06560c6
2 changed files with 11 additions and 3 deletions

View File

@@ -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 (
<Box $height="100vh" $width="100vw" $align="center" $justify="center">

View File

@@ -0,0 +1,8 @@
import { HomeContent } from '@/features/home';
import { NextPageWithLayout } from '@/types/next';
const Page: NextPageWithLayout = () => {
return <HomeContent />;
};
export default Page;