From 875963c4c2430f3c7a8f0e7a0896bf4138fe6d6e Mon Sep 17 00:00:00 2001 From: Saatvik Arya Date: Tue, 23 Jul 2024 00:33:03 -0700 Subject: [PATCH 1/3] allow signout --- apps/web/app/(dash)/header/header.tsx | 2 ++ apps/web/app/(dash)/header/signOutButton.tsx | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 apps/web/app/(dash)/header/signOutButton.tsx diff --git a/apps/web/app/(dash)/header/header.tsx b/apps/web/app/(dash)/header/header.tsx index b9d400c9..87008573 100644 --- a/apps/web/app/(dash)/header/header.tsx +++ b/apps/web/app/(dash)/header/header.tsx @@ -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() { + diff --git a/apps/web/app/(dash)/header/signOutButton.tsx b/apps/web/app/(dash)/header/signOutButton.tsx new file mode 100644 index 00000000..3135d626 --- /dev/null +++ b/apps/web/app/(dash)/header/signOutButton.tsx @@ -0,0 +1,17 @@ +import { signOut } from "@/server/auth"; +import { Button } from "@repo/ui/shadcn/button"; + +export default function SignOutButton() { + return ( +
{ + "use server" + await signOut() + }} + > + +
+ ); +} \ No newline at end of file From e99a718e433572f6e8ca9d78fbfdaebd8867786e Mon Sep 17 00:00:00 2001 From: Saatvik Arya Date: Tue, 23 Jul 2024 00:36:46 -0700 Subject: [PATCH 2/3] match text color --- apps/web/app/(dash)/header/signOutButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/app/(dash)/header/signOutButton.tsx b/apps/web/app/(dash)/header/signOutButton.tsx index 3135d626..3ef5fa2a 100644 --- a/apps/web/app/(dash)/header/signOutButton.tsx +++ b/apps/web/app/(dash)/header/signOutButton.tsx @@ -9,7 +9,7 @@ export default function SignOutButton() { await signOut() }} > - From ca1d29aec1c5d30eef653041aa732451efecbfb4 Mon Sep 17 00:00:00 2001 From: Saatvik Arya Date: Tue, 23 Jul 2024 00:38:32 -0700 Subject: [PATCH 3/3] tabs lol --- apps/web/app/(dash)/header/header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/app/(dash)/header/header.tsx b/apps/web/app/(dash)/header/header.tsx index 87008573..a3fba9b1 100644 --- a/apps/web/app/(dash)/header/header.tsx +++ b/apps/web/app/(dash)/header/header.tsx @@ -53,7 +53,7 @@ async function Header() { - +