diff --git a/client/src/components/flami/FlamiShow.tsx b/client/src/components/flami/FlamiShow.tsx index 06db6ac..c6a7a7e 100644 --- a/client/src/components/flami/FlamiShow.tsx +++ b/client/src/components/flami/FlamiShow.tsx @@ -9,11 +9,11 @@ const FlamiShow = ({ flami }: { flami: FlamiData }) => { useEffect(() => { setCurrentAnimation("Jump"); - setCurrentKeptAnimation("Atchoum"); + setCurrentKeptAnimation("Jump"); setTimeout(() => { setCurrentAnimation("Idle"); setCurrentKeptAnimation("Idle"); - }, 3200); + }, 1300); }, [setCurrentAnimation]); return ( diff --git a/client/src/components/map/Map.tsx b/client/src/components/map/Map.tsx index 9f66a62..d315a41 100644 --- a/client/src/components/map/Map.tsx +++ b/client/src/components/map/Map.tsx @@ -42,13 +42,11 @@ const Map = ({ iconSize: [40, 40], }); - const [geolocalisation, setGeolocation] = useState( - currentStep - ? new LatLng( - currentStep.geolocalisation.latitude, - currentStep.geolocalisation.longitude - ) - : new LatLng(43.282, 5.405)); + const [geolocalisation, setGeolocation] = useState(new LatLng(43.282, 5.405)); + + useEffect(() => { + if(currentStep) setGeolocation(new LatLng(currentStep.geolocalisation.latitude, currentStep.geolocalisation.longitude)) + }, [currentStep, setGeolocation]) const MapRecenter = ({ lat, diff --git a/client/src/pages/map/MapPage.tsx b/client/src/pages/map/MapPage.tsx index 7e8f7b7..250effb 100644 --- a/client/src/pages/map/MapPage.tsx +++ b/client/src/pages/map/MapPage.tsx @@ -39,7 +39,7 @@ const MapPage = () => { }; const handleCurrentStep = () => { - APIHandler(`/etape/actuelle`, true).then((res) => { + APIHandler(`/etape/15`, true).then((res) => { setCurrentFlameLocation(res.data); handleNextStep(res.data.etape_numero); });