🚚(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:
committed by
Manuel Raynaud
parent
e9ab099ce0
commit
ecd06560c6
@@ -43,7 +43,7 @@ export const Auth = ({ children }: PropsWithChildren) => {
|
|||||||
*/
|
*/
|
||||||
if (!authenticated && !pathAllowed) {
|
if (!authenticated && !pathAllowed) {
|
||||||
if (config?.FRONTEND_HOMEPAGE_FEATURE_ENABLED) {
|
if (config?.FRONTEND_HOMEPAGE_FEATURE_ENABLED) {
|
||||||
void replace('/login');
|
void replace('/home');
|
||||||
} else {
|
} else {
|
||||||
gotoLogin();
|
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('/');
|
void replace('/');
|
||||||
return (
|
return (
|
||||||
<Box $height="100vh" $width="100vw" $align="center" $justify="center">
|
<Box $height="100vh" $width="100vw" $align="center" $justify="center">
|
||||||
|
|||||||
8
src/frontend/apps/impress/src/pages/home/index.tsx
Normal file
8
src/frontend/apps/impress/src/pages/home/index.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { HomeContent } from '@/features/home';
|
||||||
|
import { NextPageWithLayout } from '@/types/next';
|
||||||
|
|
||||||
|
const Page: NextPageWithLayout = () => {
|
||||||
|
return <HomeContent />;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Page;
|
||||||
Reference in New Issue
Block a user