File tree 2 files changed +4
-6
lines changed
src/components/Authentication/Clerk
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,14 @@ import { useRouter } from "next/router";
4
4
export default function ClerkLogin ( ) {
5
5
const { query } = useRouter ( ) ;
6
6
7
- const redirectUrl = query . redirectUrl
8
- ? ( query . return_to as string )
9
- : undefined ;
7
+ const returnTo = query . return_to as string ;
10
8
11
9
return (
12
10
< SignIn
13
11
path = "/login"
14
12
routing = "path"
15
13
signUpUrl = "/registration"
16
- forceRedirectUrl = { `/?return_to=${ redirectUrl } ` }
14
+ forceRedirectUrl = { returnTo ? `/?return_to=${ returnTo } ` : undefined }
17
15
/>
18
16
) ;
19
17
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { useRouter } from "next/router";
4
4
export default function ClerkRegistration ( ) {
5
5
const { query } = useRouter ( ) ;
6
6
7
- const redirectUrl = query . redirectUrl ? query . return_to : undefined ;
7
+ const returnTo = query . return_to as string ;
8
8
9
9
return (
10
10
< div className = "flex w-full flex-col px-3 text-center" >
@@ -15,7 +15,7 @@ export default function ClerkRegistration() {
15
15
routing = "path"
16
16
signInUrl = "/login"
17
17
signInForceRedirectUrl = {
18
- redirectUrl ? `/?return_to=${ redirectUrl } ` : undefined
18
+ returnTo ? `/?return_to=${ returnTo } ` : undefined
19
19
}
20
20
/>
21
21
</ div >
You can’t perform that action at this time.
0 commit comments