Initial commit: Expedição Gold SaaS
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
export default function Dashboard() {
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem('token');
|
||||
if (!token) {
|
||||
// redirect to login if not authenticated
|
||||
router.push('/');
|
||||
}
|
||||
}, [router]);
|
||||
|
||||
const handleLogout = () => {
|
||||
localStorage.removeItem('token');
|
||||
router.push('/');
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ padding: '2rem', textAlign: 'center' }}>
|
||||
<h1>Expedição Gold</h1>
|
||||
<p>Área do jogador - Em construção</p>
|
||||
<p>Em breve: investir em expedições terrestres, marítimas, espirituais e cósmicas.</p>
|
||||
<button onClick={handleLogout} style={{ marginTop: '1.5rem', padding: '0.5rem 1rem' }}>
|
||||
Sair
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user