fix: redirect to login page after sign out
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { signOut } from "@/lib/auth"
|
||||
import { SIGN_IN_URL } from "@/lib/constants"
|
||||
|
||||
export function SignOut() {
|
||||
return (
|
||||
<form
|
||||
action={async () => {
|
||||
"use server"
|
||||
await signOut()
|
||||
await signOut({ redirectTo: SIGN_IN_URL })
|
||||
}}
|
||||
>
|
||||
<Button type="submit" variant="destructive">
|
||||
|
||||
Reference in New Issue
Block a user