fix: respect redirect param on login and signup pages
This commit is contained in:
@@ -26,7 +26,7 @@ export default function LoginPage() {
|
|||||||
|
|
||||||
const { data } = authClient.useSession();
|
const { data } = authClient.useSession();
|
||||||
|
|
||||||
if (data?.user.id) router.push("/boards");
|
if (data?.user.id) router.push(redirect ?? "/boards");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default function SignUpPage() {
|
|||||||
|
|
||||||
const { data } = authClient.useSession();
|
const { data } = authClient.useSession();
|
||||||
|
|
||||||
if (data?.user.id) router.push("/boards");
|
if (data?.user.id) router.push(redirect ?? "/boards");
|
||||||
|
|
||||||
const handleMagicLinkSent = (value: boolean, recipient: string) => {
|
const handleMagicLinkSent = (value: boolean, recipient: string) => {
|
||||||
setIsMagicLinkSent(value);
|
setIsMagicLinkSent(value);
|
||||||
|
|||||||
Reference in New Issue
Block a user