bug: logged in check is added in the useEffect (#921)

This commit is contained in:
palash-signoz 2022-04-01 15:47:39 +05:30 committed by GitHub
parent 1b28a4e6f5
commit d085506d3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,12 @@ function AppLayout(props: AppLayoutProps): JSX.Element {
} }
}, [isLoggedIn, isSignUpPage]); }, [isLoggedIn, isSignUpPage]);
useEffect(() => {
if (isLoggedIn) {
history.push(ROUTES.APPLICATION);
}
}, [isLoggedIn]);
return ( return (
<Layout> <Layout>
{!isSignUpPage && <SideNav />} {!isSignUpPage && <SideNav />}