scrollTop on component init
This commit is contained in:
parent
88047ec458
commit
13f7d9fd52
|
|
@ -1,18 +1,19 @@
|
|||
import React, { useState } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import Lottie from "lottie-react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import Loading from "../animations/Loading";
|
||||
|
||||
import Modal from "../../components/ui/Modal.jsx";
|
||||
import cup from "../../assets/img/illustrations/cup.svg";
|
||||
import celebration from "../../assets/animations/celebration.json";
|
||||
import celebrationConfettis from "../../assets/animations/trophee-confettis.json";
|
||||
import celebrationConfettisFixe from "../../assets/animations/trophee-confettis-fixe.json";
|
||||
import sucessIcon from "../../assets/img/icons/behaviour-type-success.svg";
|
||||
import modalBackground from "../../assets/img/shapes-background/modal-background.svg";
|
||||
import { useUser } from "../../hooks/useUser.jsx";
|
||||
|
||||
export default function ResultsModals({ resultsDatas }) {
|
||||
useEffect(() => {
|
||||
document.querySelector("dialog").scrollTo(0, 0);
|
||||
}, []);
|
||||
const navigate = useNavigate();
|
||||
|
||||
const { screensTranslations } = useUser();
|
||||
|
|
@ -20,7 +21,6 @@ export default function ResultsModals({ resultsDatas }) {
|
|||
|
||||
if (!screensTranslations || !screensTranslations.game_results) return <Loading />;
|
||||
const currentScreenTranslations = screensTranslations.game_results;
|
||||
console.log(currentScreenTranslations);
|
||||
|
||||
if (!resultsDatas) return navigate("/home");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user