diff options
| author | Andrew Lee <andrew@alee14.me> | 2025-03-25 17:23:30 -0400 |
|---|---|---|
| committer | Andrew Lee <andrew@alee14.me> | 2025-03-25 17:23:30 -0400 |
| commit | 2c783bdb703e4ad69c9f3f846c2c9e6a527ccc80 (patch) | |
| tree | e02587b4dca4bd7027b4cc012d458b18392643ea /web/src/app/components/sign-out.jsx | |
| parent | 1c12d378d66b92b1674acd17640f2bac752da289 (diff) | |
| download | AleeBot-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.jsx | 15 |
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> + ); } |
