2025-07-23 22:26:54 -04:00
|
|
|
import { useEffect } from 'react';
|
|
|
|
|
import { useRouter } from 'next/router';
|
2025-07-25 12:28:04 -04:00
|
|
|
import AuthLayout from '../components/AuthLayout';
|
2025-07-23 22:26:54 -04:00
|
|
|
|
|
|
|
|
export default function Logout() {
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
2025-07-24 17:36:10 -04:00
|
|
|
// Clear the auth token
|
|
|
|
|
localStorage.removeItem('auth_token');
|
|
|
|
|
|
|
|
|
|
// Redirect to login after a short delay
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
router.push('/login');
|
|
|
|
|
}, 2000);
|
2025-07-23 22:26:54 -04:00
|
|
|
}, [router]);
|
|
|
|
|
|
|
|
|
|
return (
|
2025-07-25 12:28:04 -04:00
|
|
|
<AuthLayout>
|
2025-07-24 17:36:10 -04:00
|
|
|
<div className="min-h-screen flex items-center justify-center">
|
|
|
|
|
<div className="text-center">
|
|
|
|
|
<div className="text-6xl mb-4">👋</div>
|
|
|
|
|
<h2 className="text-2xl font-bold mb-2" style={{ color: 'var(--text-primary)' }}>
|
|
|
|
|
Signing you out...
|
|
|
|
|
</h2>
|
|
|
|
|
<p style={{ color: 'var(--text-secondary)' }}>
|
|
|
|
|
You will be redirected to the login page shortly.
|
|
|
|
|
</p>
|
|
|
|
|
<div className="mt-4">
|
|
|
|
|
<div className="animate-spin rounded-full h-8 w-8 border-b-2 mx-auto" style={{ borderColor: 'var(--text-accent)' }}></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-07-23 22:26:54 -04:00
|
|
|
</div>
|
2025-07-25 12:28:04 -04:00
|
|
|
</AuthLayout>
|
2025-07-23 22:26:54 -04:00
|
|
|
);
|
|
|
|
|
}
|