Use callback

This commit is contained in:
Astrian Zheng 2023-10-13 14:16:58 +11:00
parent 3e4afef37e
commit cf1d0f5675
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA

View File

@ -48,8 +48,7 @@ export default function Home() {
filter: "blur(10px)",
duration: 0.2,
ease: "in",
});
onComplete: () => {
setHitokoto(data.hitokoto);
setFromWho(data.from_who);
setFrom(data.from);
@ -60,6 +59,10 @@ export default function Home() {
duration: 0.2,
ease: "out",
})
}
});
} else {
console.log("not updated")
}