cleaning
This commit is contained in:
parent
b4e364948e
commit
1763c1105a
35
src/App.js
35
src/App.js
|
|
@ -1,46 +1,37 @@
|
||||||
import "./assets/css/App.scss";
|
import "./assets/css/App.scss";
|
||||||
import Welcome from "./pages/Welcome.jsx";
|
import Welcome from "./pages/Welcome.jsx";
|
||||||
import Home from "./pages/Home.jsx";
|
import Home from "./pages/Home.jsx";
|
||||||
import Single from "./pages/Single.jsx";
|
|
||||||
import Profile from "./pages/Profile.jsx";
|
import Profile from "./pages/Profile.jsx";
|
||||||
import Country from "./pages/Country.jsx";
|
import Country from "./pages/Country.jsx";
|
||||||
import Results from "./pages/Results.jsx";
|
import Results from "./pages/Results.jsx";
|
||||||
import Test from "./pages/Test.jsx";
|
import Test from "./pages/Test.jsx";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
|
||||||
import Game from "./pages/Game.jsx";
|
import Game from "./pages/Game.jsx";
|
||||||
import Rating from "./pages/Rating.jsx";
|
import Rating from "./pages/Rating.jsx";
|
||||||
import Lottie from "lottie-react";
|
import About from "./pages/About.jsx";
|
||||||
|
import ConditionsOfUse from "./pages/ConditionsOfUse.jsx";
|
||||||
|
import Cookies from "./pages/Cookies.jsx";
|
||||||
|
import Confidentiality from "./pages/Confidentiality.jsx";
|
||||||
|
|
||||||
import { useLocation, Routes, Route } from "react-router-dom";
|
import { useLocation, Routes, Route } from "react-router-dom";
|
||||||
import { AnimatePresence } from "framer-motion";
|
import { AnimatePresence } from "framer-motion";
|
||||||
import cloudPageTransition from "./assets/animations/transition-nuages-pages";
|
|
||||||
import React, { useEffect, useRef } from "react";
|
import React, { useEffect, useRef } from "react";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|
||||||
const playerRef = useRef(Lottie);
|
// const playerRef = useRef(Lottie);
|
||||||
|
|
||||||
const playAnimation = () => {
|
// const playAnimation = () => {
|
||||||
playerRef.current.goToAndPlay(0);
|
// playerRef.current.goToAndPlay(0);
|
||||||
};
|
// };
|
||||||
|
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
playAnimation();
|
// playAnimation();
|
||||||
}, [location]);
|
// }, [location]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <button onClick={playAnimation}>qsdqsd</button> */}
|
{/* <button onClick={playAnimation}>qsdqsd</button> */}
|
||||||
<Lottie
|
|
||||||
lottieRef={playerRef}
|
|
||||||
className='test-load-animation'
|
|
||||||
animationData={cloudPageTransition}
|
|
||||||
speed={21}
|
|
||||||
// loop={false}
|
|
||||||
loop={false}
|
|
||||||
autoplay
|
|
||||||
/>
|
|
||||||
|
|
||||||
<AnimatePresence mode='wait'>
|
<AnimatePresence mode='wait'>
|
||||||
<Routes location={location} key={location.pathname}>
|
<Routes location={location} key={location.pathname}>
|
||||||
|
|
@ -51,6 +42,10 @@ function App() {
|
||||||
<Route path='/play' element={<Game />} />
|
<Route path='/play' element={<Game />} />
|
||||||
<Route path='/results' element={<Results />} />
|
<Route path='/results' element={<Results />} />
|
||||||
<Route path='/rating' element={<Rating />} />
|
<Route path='/rating' element={<Rating />} />
|
||||||
|
<Route path='/about' element={<About />} />
|
||||||
|
<Route path='/conditions' element={<ConditionsOfUse />} />
|
||||||
|
<Route path='/cookies' element={<Cookies />} />
|
||||||
|
<Route path='/confidentiality' element={<Confidentiality />} />
|
||||||
<Route path='/test' element={<Test />} />
|
<Route path='/test' element={<Test />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
</AnimatePresence>
|
</AnimatePresence>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user