From d5555117e574e50f217a10765862f5a870199689 Mon Sep 17 00:00:00 2001 From: Henit Chobisa Date: Thu, 21 Sep 2023 11:53:37 +0000 Subject: [PATCH] chore: shifted index page to /home route --- space/components/accounts/sign-in.tsx | 4 ++-- space/pages/home/index.tsx | 8 ++++++++ space/pages/index.tsx | 7 ++----- 3 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 space/pages/home/index.tsx diff --git a/space/components/accounts/sign-in.tsx b/space/components/accounts/sign-in.tsx index d3c29103d..858dd5173 100644 --- a/space/components/accounts/sign-in.tsx +++ b/space/components/accounts/sign-in.tsx @@ -33,7 +33,7 @@ export const SignInView = observer(() => { const onSignInSuccess = (response: any) => { const isOnboarded = response?.user?.onboarding_step?.profile_complete || false; - const nextPath = router.asPath.includes("next_path") ? router.asPath.split("/?next_path=")[1] : "/"; + const nextPath = router.asPath.includes("next_path") ? router.asPath.split("/?next_path=")[1] : "/home"; userStore.setCurrentUser(response?.user); @@ -41,7 +41,7 @@ export const SignInView = observer(() => { router.push(`/onboarding?next_path=${nextPath}`); return; } - router.push((nextPath ?? "/").toString()); + router.push((nextPath ?? "/home").toString()); }; const handleGoogleSignIn = async ({ clientId, credential }: any) => { diff --git a/space/pages/home/index.tsx b/space/pages/home/index.tsx new file mode 100644 index 000000000..abd066c43 --- /dev/null +++ b/space/pages/home/index.tsx @@ -0,0 +1,8 @@ +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 index fe0b7d33a..5f346ccf8 100644 --- a/space/pages/index.tsx +++ b/space/pages/index.tsx @@ -1,8 +1,5 @@ import React from "react"; -// components -import { HomeView } from "components/views"; +const space = () => <>; -const HomePage = () => ; - -export default HomePage; +export default space;