scroll top on component mount
This commit is contained in:
parent
9adc3194ab
commit
67ea922811
|
|
@ -1,4 +1,4 @@
|
||||||
import React from "react";
|
import React, { useEffect } from "react";
|
||||||
import { useGame } from "../../hooks/useGame";
|
import { useGame } from "../../hooks/useGame";
|
||||||
|
|
||||||
import sucessIcon from "../../assets/img/icons/behaviour-type-success.svg";
|
import sucessIcon from "../../assets/img/icons/behaviour-type-success.svg";
|
||||||
|
|
@ -7,6 +7,9 @@ import { useUser } from "../../hooks/useUser";
|
||||||
import Loading from "../animations/Loading";
|
import Loading from "../animations/Loading";
|
||||||
|
|
||||||
export default function GameAnwerExplanation({ questionId }) {
|
export default function GameAnwerExplanation({ questionId }) {
|
||||||
|
useEffect(() => {
|
||||||
|
document.querySelector("dialog").scrollTo(0, 0);
|
||||||
|
},[]);
|
||||||
const { answers, contextGameDatas, setCurrentGameModal, checkIfGameIsComplete } = useGame();
|
const { answers, contextGameDatas, setCurrentGameModal, checkIfGameIsComplete } = useGame();
|
||||||
const { screensTranslations } = useUser();
|
const { screensTranslations } = useUser();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user