Use callback
This commit is contained in:
parent
3e4afef37e
commit
cf1d0f5675
|
@ -48,18 +48,21 @@ export default function Home() {
|
|||
filter: "blur(10px)",
|
||||
duration: 0.2,
|
||||
ease: "in",
|
||||
onComplete: () => {
|
||||
setHitokoto(data.hitokoto);
|
||||
setFromWho(data.from_who);
|
||||
setFrom(data.from);
|
||||
|
||||
timeline.to(motto.current, {
|
||||
opacity: 1,
|
||||
filter: "blur(0px)",
|
||||
duration: 0.2,
|
||||
ease: "out",
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
setHitokoto(data.hitokoto);
|
||||
setFromWho(data.from_who);
|
||||
setFrom(data.from);
|
||||
|
||||
timeline.to(motto.current, {
|
||||
opacity: 1,
|
||||
filter: "blur(0px)",
|
||||
duration: 0.2,
|
||||
ease: "out",
|
||||
})
|
||||
} else {
|
||||
console.log("not updated")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user