Skip to content

Commit ecd0656

Browse files
AntoLClunika
authored andcommitted
🚚(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.
1 parent e9ab099 commit ecd0656

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/frontend/apps/impress/src/features/auth/components/Auth.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const Auth = ({ children }: PropsWithChildren) => {
4343
*/
4444
if (!authenticated && !pathAllowed) {
4545
if (config?.FRONTEND_HOMEPAGE_FEATURE_ENABLED) {
46-
void replace('/login');
46+
void replace('/home');
4747
} else {
4848
gotoLogin();
4949
}
@@ -55,9 +55,9 @@ export const Auth = ({ children }: PropsWithChildren) => {
5555
}
5656

5757
/**
58-
* If the user is authenticated and the path is the login page, we redirect to the home page.
58+
* If the user is authenticated and the path is the home page, we redirect to the index.
5959
*/
60-
if (pathname === '/login' && authenticated) {
60+
if (pathname === '/home' && authenticated) {
6161
void replace('/');
6262
return (
6363
<Box $height="100vh" $width="100vw" $align="center" $justify="center">
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { HomeContent } from '@/features/home';
2+
import { NextPageWithLayout } from '@/types/next';
3+
4+
const Page: NextPageWithLayout = () => {
5+
return <HomeContent />;
6+
};
7+
8+
export default Page;

0 commit comments

Comments
 (0)