Atualizar src/app/admin/login/page.jsx
This commit is contained in:
@ -8,13 +8,13 @@ export default function LoginPage() {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const handleSubmit = async (e) => {
|
const handleSubmit = async (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
// Aqui virá a autenticação
|
if (email === 'admin@friascar.com' && password === 'admin123') {
|
||||||
if (email === 'admin@friascar.com' && password === 'admin123') {
|
// Salvar token em cookie
|
||||||
// Salvar token ou session
|
document.cookie = 'auth_token=true; path=/';
|
||||||
router.push('/admin');
|
window.location.href = '/admin';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50 flex flex-col justify-center">
|
<div className="min-h-screen bg-gray-50 flex flex-col justify-center">
|
||||||
|
|||||||
Reference in New Issue
Block a user