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();
|
||||
|
||||
useEffect(() => {
|
||||
if (next_path && currentUser?.onboarding_step?.profile_complete)
|
||||
router.push(next_path.toString().replace(/[^a-zA-Z0-9\-._~:/?#[\]@!$&'()*+,;=]/g, ""));
|
||||
if (next_path && currentUser?.onboarding_step?.profile_complete) {
|
||||
const encodedPath = encodeURI(next_path.toString()); // Encode the URL
|
||||
router.push(encodedPath);
|
||||
}
|
||||
}, [router, next_path, currentUser]);
|
||||
|
||||
return <LoginView />;
|
||||
|
Loading…
Reference in New Issue
Block a user