forked from github/plane
fix: 404 when redirecting user clicks on Sign In button (#2349)
* fix: 404 when redirecting user to login page * fix: next_path redirection not working * fix: authentication workflow update in plane deploy --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
19
space/pages/index.tsx
Normal file
19
space/pages/index.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { useEffect } from "react";
|
||||
|
||||
// next
|
||||
import { NextPage } from "next";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
const Index: NextPage = () => {
|
||||
const router = useRouter();
|
||||
const { next_path } = router.query as { next_path: string };
|
||||
|
||||
useEffect(() => {
|
||||
if (next_path) router.push(`/login?next_path=${next_path}`);
|
||||
else router.push(`/login`);
|
||||
}, [router, next_path]);
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
export default Index;
|
||||
@@ -5,4 +5,4 @@ import { LoginView } from "components/views";
|
||||
|
||||
const LoginPage = () => <LoginView />;
|
||||
|
||||
export default LoginPage;
|
||||
export default LoginPage;
|
||||
|
||||
Reference in New Issue
Block a user