Animation work

This commit is contained in:
Julien Valverdé
2024-07-18 03:19:24 +02:00
parent d07ba927f9
commit 00aa9fe10f

View File

@@ -33,8 +33,12 @@ export function Root() {
<AnimatePresence mode="popLayout"> <AnimatePresence mode="popLayout">
<AnimatedOutlet <AnimatedOutlet
key={nextMatch.id} key={nextMatch.id}
initial={{ x: "100%" }}
animate={{ x: "0" }} transition={{ x: { type: "spring", stiffness: 300, damping: 30 } }}
initial={{ x: "100vw", opacity: 0 }}
animate={{ x: "0", opacity: 1 }}
exit={{ x: "-100vw", opacity: 0 }}
/> />
</AnimatePresence> </AnimatePresence>
</div> </div>