summaryrefslogtreecommitdiff
path: root/src/lib/auth/components
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-12-24 08:51:37 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-12-24 08:51:37 +0700
commit22bf497d3fd524a95982e090f2c8a1be6bde656b (patch)
tree1c394154c78ea81e06b302eeffcb9dfb14497144 /src/lib/auth/components
parentb2afb5c847c9983b098a3223fbcfdb666e65c8cb (diff)
parentd76f96c44f85e7e0efbd544e6b97bd80920b0039 (diff)
Merge branch 'new-release' into Feature/switch-account
# Conflicts: # src-migrate/modules/register/components/FormBisnis.tsx # src/lib/auth/components/Menu.jsx
Diffstat (limited to 'src/lib/auth/components')
-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'>