From 7311f6d40d9a15fa01f689232c019cdb7d34d50a Mon Sep 17 00:00:00 2001 From: Henit Chobisa Date: Fri, 22 Sep 2023 09:38:10 +0000 Subject: [PATCH] chore: routed home to login route as login page --- space/components/accounts/sign-in.tsx | 2 +- space/components/views/index.ts | 2 +- space/components/views/{home.tsx => login.tsx} | 2 +- space/pages/home/index.tsx | 8 -------- space/pages/index.tsx | 5 ----- space/pages/login/index.tsx | 8 ++++++++ 6 files changed, 11 insertions(+), 16 deletions(-) rename space/components/views/{home.tsx => login.tsx} (88%) delete mode 100644 space/pages/home/index.tsx delete mode 100644 space/pages/index.tsx create mode 100644 space/pages/login/index.tsx diff --git a/space/components/accounts/sign-in.tsx b/space/components/accounts/sign-in.tsx index 858dd5173..ca6aa9e47 100644 --- a/space/components/accounts/sign-in.tsx +++ b/space/components/accounts/sign-in.tsx @@ -41,7 +41,7 @@ export const SignInView = observer(() => { router.push(`/onboarding?next_path=${nextPath}`); return; } - router.push((nextPath ?? "/home").toString()); + router.push((nextPath ?? "/login").toString()); }; const handleGoogleSignIn = async ({ clientId, credential }: any) => { diff --git a/space/components/views/index.ts b/space/components/views/index.ts index 84d36cd29..f54d11bdd 100644 --- a/space/components/views/index.ts +++ b/space/components/views/index.ts @@ -1 +1 @@ -export * from "./home"; +export * from "./login"; diff --git a/space/components/views/home.tsx b/space/components/views/login.tsx similarity index 88% rename from space/components/views/home.tsx rename to space/components/views/login.tsx index 999fce073..d01a22681 100644 --- a/space/components/views/home.tsx +++ b/space/components/views/login.tsx @@ -4,7 +4,7 @@ import { useMobxStore } from "lib/mobx/store-provider"; // components import { SignInView, UserLoggedIn } from "components/accounts"; -export const HomeView = observer(() => { +export const LoginView = observer(() => { const { user: userStore } = useMobxStore(); if (!userStore.currentUser) return ; diff --git a/space/pages/home/index.tsx b/space/pages/home/index.tsx deleted file mode 100644 index abd066c43..000000000 --- a/space/pages/home/index.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; - -// components -import { HomeView } from "components/views"; - -const HomePage = () => ; - -export default HomePage; \ No newline at end of file diff --git a/space/pages/index.tsx b/space/pages/index.tsx deleted file mode 100644 index 5f346ccf8..000000000 --- a/space/pages/index.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import React from "react"; - -const space = () => <>; - -export default space; diff --git a/space/pages/login/index.tsx b/space/pages/login/index.tsx new file mode 100644 index 000000000..a80eff873 --- /dev/null +++ b/space/pages/login/index.tsx @@ -0,0 +1,8 @@ +import React from "react"; + +// components +import { LoginView } from "components/views"; + +const LoginPage = () => ; + +export default LoginPage; \ No newline at end of file