mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-10 03:28:14 +00:00
Merge pull request #145 from aryasaatvik/signout
feat(web): allow signout
This commit is contained in:
commit
3c361a7464
2 changed files with 24 additions and 1 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";
|
||||
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@repo/ui/shadcn/dropdown-menu";
|
||||
import { CaretDownIcon } from "@radix-ui/react-icons";
|
||||
|
||||
|
|
@ -50,10 +51,15 @@ async function Header() {
|
|||
>
|
||||
{thread.firstMessage}
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
|
||||
<SignOutButton />
|
||||
</div>
|
||||
|
||||
|
||||
</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" className="text-[#7D8994]">
|
||||
Sign Out
|
||||
</Button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue