aboutsummaryrefslogtreecommitdiff
path: root/web/src/app/components/sign-out.jsx
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-03-25 17:23:30 -0400
committerAndrew Lee <andrew@alee14.me>2025-03-25 17:23:30 -0400
commit2c783bdb703e4ad69c9f3f846c2c9e6a527ccc80 (patch)
treee02587b4dca4bd7027b4cc012d458b18392643ea /web/src/app/components/sign-out.jsx
parent1c12d378d66b92b1674acd17640f2bac752da289 (diff)
downloadAleeBot-2c783bdb703e4ad69c9f3f846c2c9e6a527ccc80.tar.gz
AleeBot-2c783bdb703e4ad69c9f3f846c2c9e6a527ccc80.tar.bz2
AleeBot-2c783bdb703e4ad69c9f3f846c2c9e6a527ccc80.zip
Implemented admin dashboard
Diffstat (limited to 'web/src/app/components/sign-out.jsx')
-rw-r--r--web/src/app/components/sign-out.jsx15
1 files changed, 13 insertions, 2 deletions
diff --git a/web/src/app/components/sign-out.jsx b/web/src/app/components/sign-out.jsx
index dd6693d..b0762d8 100644
--- a/web/src/app/components/sign-out.jsx
+++ b/web/src/app/components/sign-out.jsx
@@ -1,5 +1,16 @@
+'use client';
+import { useAuth } from '@/context/middleware';
+
export default function SignOut() {
+ const { logout } = useAuth();
+
return (
- <button type="submit" className="py-2 px-4 rounded-md text-md bg-red-700 hover:bg-red-500">Sign out</button>
- )
+ <button
+ type="button"
+ onClick={logout}
+ className="py-2 px-4 rounded-md text-md bg-red-700 hover:bg-red-500"
+ >
+ Sign out
+ </button>
+ );
}