File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
- import {
2
- clearSessionAndRedirect ,
3
- getAuthorizationUrl ,
4
- getUser ,
5
- } from "../../auth" ;
1
+ import { clearCookie , getAuthorizationUrl , getUser } from "../../auth" ;
6
2
import { Button , Flex } from "@radix-ui/themes" ;
7
3
8
4
export async function SignInButton ( { large } : { large ?: boolean } ) {
@@ -15,7 +11,7 @@ export async function SignInButton({ large }: { large?: boolean }) {
15
11
< form
16
12
action = { async ( ) => {
17
13
"use server" ;
18
- await clearSessionAndRedirect ( ) ;
14
+ await clearCookie ( ) ;
19
15
} }
20
16
>
21
17
< Button type = "submit" size = { large ? "3" : "2" } >
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export async function getUser(): Promise<{
64
64
return { isAuthenticated : false } ;
65
65
}
66
66
67
- export async function clearSessionAndRedirect ( ) {
67
+ export async function clearCookie ( ) {
68
68
cookies ( ) . delete ( "token" ) ;
69
69
redirect ( "/" ) ;
70
70
}
You can’t perform that action at this time.
0 commit comments