mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix logout
This commit is contained in:
parent
7a013d4f40
commit
d96d89bcb8
1 changed files with 5 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import { getRequestEvent } from "solid-js/web"
|
|||
import { useAuthSession } from "~/context/auth.session"
|
||||
import { Dropdown } from "~/component/dropdown"
|
||||
import "./user-menu.css"
|
||||
import { getResponseHeaders } from "@solidjs/start/http"
|
||||
|
||||
const logout = action(async () => {
|
||||
"use server"
|
||||
|
|
@ -17,7 +18,10 @@ const logout = action(async () => {
|
|||
event!.locals.actor = undefined
|
||||
return val
|
||||
})
|
||||
throw redirect("/zen")
|
||||
throw redirect("/zen", {
|
||||
status: 302,
|
||||
headers: getResponseHeaders(),
|
||||
})
|
||||
})
|
||||
|
||||
export function UserMenu(props: { email: string | null | undefined }) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue