|
@@ -1,3 +1,4 @@
|
|
|
|
|
+import "./workspace.css"
|
|
|
import { useAuthSession } from "~/context/auth.session"
|
|
import { useAuthSession } from "~/context/auth.session"
|
|
|
import { IconLogo } from "../component/icon"
|
|
import { IconLogo } from "../component/icon"
|
|
|
import { withActor } from "~/context/auth.withActor"
|
|
import { withActor } from "~/context/auth.withActor"
|
|
@@ -28,6 +29,7 @@ const logout = action(async () => {
|
|
|
event!.locals.actor = undefined
|
|
event!.locals.actor = undefined
|
|
|
return val
|
|
return val
|
|
|
})
|
|
})
|
|
|
|
|
+ throw redirect("/")
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
export default function WorkspaceLayout(props: RouteSectionProps) {
|
|
export default function WorkspaceLayout(props: RouteSectionProps) {
|
|
@@ -43,7 +45,7 @@ export default function WorkspaceLayout(props: RouteSectionProps) {
|
|
|
</div>
|
|
</div>
|
|
|
<div data-slot="header-actions">
|
|
<div data-slot="header-actions">
|
|
|
<span>{userInfo()?.user.email}</span>
|
|
<span>{userInfo()?.user.email}</span>
|
|
|
- <form onSubmit={() => (location.href = "/")} action={logout} method="post">
|
|
|
|
|
|
|
+ <form action={logout} method="post">
|
|
|
<button type="submit" formaction={logout}>
|
|
<button type="submit" formaction={logout}>
|
|
|
Logout
|
|
Logout
|
|
|
</button>
|
|
</button>
|