|
|
|
|
@ -9,7 +9,7 @@ import Countdown from "./Countdown";
|
|
|
|
|
import ImageUpload from "./ImageUpload"; |
|
|
|
|
|
|
|
|
|
export const MyForm = () => { |
|
|
|
|
const [mandato, cambiaMandato] = useState(false); |
|
|
|
|
const [mandato, cambiaMandato] = useState(true); |
|
|
|
|
const [immagineURL, cambiaimmagineURL] = useState(null); |
|
|
|
|
const { register, handleSubmit } = useForm(); |
|
|
|
|
const onSubmit = ({ testo, autore }) => { |
|
|
|
|
@ -33,10 +33,27 @@ export const MyForm = () => {
|
|
|
|
|
|
|
|
|
|
if (mandato) { |
|
|
|
|
return ( |
|
|
|
|
<Stack> |
|
|
|
|
<div>mandato e mo aspetti</div> |
|
|
|
|
<Countdown onComplete={() => cambiaMandato(false)} duration={5} /> |
|
|
|
|
</Stack> |
|
|
|
|
<div |
|
|
|
|
style={{ |
|
|
|
|
fontFamily: "Lineatura", |
|
|
|
|
height: "100vh", |
|
|
|
|
width: "100%", |
|
|
|
|
textAlign: "center", |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
<Typography |
|
|
|
|
style={{ |
|
|
|
|
fontFamily: "Lineatura", |
|
|
|
|
}} |
|
|
|
|
variant="h2" |
|
|
|
|
> |
|
|
|
|
mandato! |
|
|
|
|
</Typography> |
|
|
|
|
<h1 style={{ fontFamily: "LineaturaLight" }}> |
|
|
|
|
puoi rimandere un altro messaggio in... |
|
|
|
|
<Countdown onComplete={() => cambiaMandato(false)} duration={10} /> |
|
|
|
|
</h1> |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
return ( |
|
|
|
|
|