mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-10 03:28:14 +00:00
allow signout
This commit is contained in:
parent
f310781ad7
commit
875963c4c2
2 changed files with 19 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import Logo from "../../../public/logo.svg";
|
|||
import { getChatHistory } from "../../actions/fetchers";
|
||||
import NewChatButton from "./newChatButton";
|
||||
import AutoBreadCrumbs from "./autoBreadCrumbs";
|
||||
import SignOutButton from "./signOutButton";
|
||||
|
||||
async function Header() {
|
||||
const chatThreads = await getChatHistory();
|
||||
|
|
@ -52,6 +53,7 @@ async function Header() {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<SignOutButton />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
17
apps/web/app/(dash)/header/signOutButton.tsx
Normal file
17
apps/web/app/(dash)/header/signOutButton.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { signOut } from "@/server/auth";
|
||||
import { Button } from "@repo/ui/shadcn/button";
|
||||
|
||||
export default function SignOutButton() {
|
||||
return (
|
||||
<form
|
||||
action={async () => {
|
||||
"use server"
|
||||
await signOut()
|
||||
}}
|
||||
>
|
||||
<Button variant="ghost" size="sm" type="submit">
|
||||
Sign Out
|
||||
</Button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue