diff --git a/src/App.js b/src/App.js index 9605677..0d46f8f 100644 --- a/src/App.js +++ b/src/App.js @@ -9,26 +9,52 @@ import Test from "./pages/Test.jsx"; import { v4 as uuidv4 } from "uuid"; import Game from "./pages/Game.jsx"; import Rating from "./pages/Rating.jsx"; +import Lottie from "lottie-react"; import { useLocation, Routes, Route } from "react-router-dom"; import { AnimatePresence } from "framer-motion"; +import cloudPageTransition from "./assets/animations/transition-nuages-pages"; +import React, { useEffect, useRef } from "react"; function App() { const location = useLocation(); + + const playerRef = useRef(Lottie); + + const playAnimation = () => { + playerRef.current.goToAndPlay(0); + }; + + useEffect(() => { + playAnimation(); + }, [location]); + return ( - - - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - + <> + {/* */} + + + + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + + ); } diff --git a/src/assets/css/App.scss b/src/assets/css/App.scss index 54baf58..e03d2f1 100644 --- a/src/assets/css/App.scss +++ b/src/assets/css/App.scss @@ -31,3 +31,16 @@ p { @apply my-0; } + +.test-load-animation { + @apply w-full h-full fixed top-0 left-0; + z-index: 90; + position: fixed; + z-index: 40; + pointer-events: none; + svg { + // @apply bg-green-400; + width: 100px; + heigth: 100px; + } +}