fix: linting problems
This commit is contained in:
parent
8f572ed10c
commit
d21fa01ff2
|
@ -3,19 +3,17 @@
|
|||
import { useRouter } from 'next/navigation';
|
||||
import { useState, useEffect } from 'react';
|
||||
|
||||
export default function play() {
|
||||
export default function Play() {
|
||||
const [grade, setGrade] = useState<number>(0);
|
||||
const router = useRouter();
|
||||
let voted;
|
||||
const [password, setPassword] = useState<string | null>('');
|
||||
useEffect(() => {
|
||||
const pass = localStorage.getItem('@password');
|
||||
setPassword(pass);
|
||||
voted = localStorage.getItem('@voted');
|
||||
if (!pass) {
|
||||
router.push('/');
|
||||
}
|
||||
}, []);
|
||||
}, [router]);
|
||||
|
||||
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
|
||||
event.preventDefault();
|
||||
|
@ -35,10 +33,6 @@ export default function play() {
|
|||
return (
|
||||
<div>
|
||||
<h1>Calendrier-avant</h1>
|
||||
|
||||
{voted ? (
|
||||
<p>Vous avez déjà voté</p>
|
||||
) : (
|
||||
<div>
|
||||
<p>Cliquer sur la note à la fin de la présentation :</p>
|
||||
<form onSubmit={handleSubmit}>
|
||||
|
@ -78,7 +72,6 @@ export default function play() {
|
|||
<input type="submit" value={'Envoyer'}></input>
|
||||
</form>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue