summaryrefslogtreecommitdiff
path: root/src/lib/auth/components/Menu.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/auth/components/Menu.jsx')
-rw-r--r--src/lib/auth/components/Menu.jsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/auth/components/Menu.jsx b/src/lib/auth/components/Menu.jsx
index 7b766968..86ceef22 100644
--- a/src/lib/auth/components/Menu.jsx
+++ b/src/lib/auth/components/Menu.jsx
@@ -6,7 +6,7 @@ import useAuth from '@/core/hooks/useAuth';
import switchAccountProgresApi from '@/lib/auth/api/switchAccountProgresApi.js';
import { useState, useEffect } from 'react';
import { InfoIcon } from 'lucide-react';
-
+import { deleteAuth } from '@/core/utils/auth';
const Menu = () => {
const router = useRouter();
const auth = useAuth();
@@ -21,6 +21,12 @@ const Menu = () => {
loadProgres();
}, []);
const routeStartWith = (route) => router.pathname.startsWith(route);
+
+ const logout = async () => {
+ deleteAuth().then(() => {
+ router.push('/login');
+ });
+ };
return (
<div className='grid grid-cols-1 bg-white border border-gray_r-6 rounded py-2 px-4 sticky top-48'>
<div className='flex justify-between py-4'>