feat: add login redirect to the page which initiated auth

This commit is contained in:
Kentai Radiquum 2024-08-04 14:33:22 +05:00
parent d28011b4fb
commit 3378d5b99e
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
7 changed files with 12 additions and 14 deletions

View file

@ -74,7 +74,7 @@ export function BookmarksCategoryPage(props: any) {
useEffect(() => {
if (authState === "finished" && !token) {
router.push("/login");
router.push(`/login?redirect=/bookmarks/${props.slug}`);
}
}, [authState, token]);