forked from github/plane
chore: next_path url redirection fix
This commit is contained in:
parent
200841304d
commit
79e225d168
@ -18,8 +18,10 @@ const Index: NextPage = observer(() => {
|
|||||||
}: RootStore = useMobxStore();
|
}: RootStore = useMobxStore();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (next_path && currentUser?.onboarding_step?.profile_complete)
|
if (next_path && currentUser?.onboarding_step?.profile_complete) {
|
||||||
router.push(next_path.toString().replace(/[^a-zA-Z0-9\-._~:/?#[\]@!$&'()*+,;=]/g, ""));
|
const encodedPath = encodeURI(next_path.toString()); // Encode the URL
|
||||||
|
router.push(encodedPath);
|
||||||
|
}
|
||||||
}, [router, next_path, currentUser]);
|
}, [router, next_path, currentUser]);
|
||||||
|
|
||||||
return <LoginView />;
|
return <LoginView />;
|
||||||
|
Loading…
Reference in New Issue
Block a user