aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/(dash)/header/signOutButton.tsx
diff options
context:
space:
mode:
authorDhravya Shah <[email protected]>2024-07-25 17:35:15 -0500
committerDhravya Shah <[email protected]>2024-07-25 17:35:15 -0500
commitc57719446ae95c2bbd432d7b2b6648a23b35c351 (patch)
treec6f7aca777c7f4748cc6dc335fe56fba8725af02 /apps/web/app/(dash)/header/signOutButton.tsx
parentadd try catch in api/add for better error handling (diff)
parentughh, regenerated migrations. my bad. (diff)
downloadsupermemory-kush/experimental-thread.tar.xz
supermemory-kush/experimental-thread.zip
solve merge conflictskush/experimental-thread
Diffstat (limited to 'apps/web/app/(dash)/header/signOutButton.tsx')
-rw-r--r--apps/web/app/(dash)/header/signOutButton.tsx22
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/web/app/(dash)/header/signOutButton.tsx b/apps/web/app/(dash)/header/signOutButton.tsx
new file mode 100644
index 00000000..4c61c74d
--- /dev/null
+++ b/apps/web/app/(dash)/header/signOutButton.tsx
@@ -0,0 +1,22 @@
+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>
+ );
+}