scrolling top on slide change
This commit is contained in:
parent
9e3ffe4062
commit
a57ff4142c
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
import Modal from "../ui/Modal.jsx";
|
import Modal from "../ui/Modal.jsx";
|
||||||
import { useGame } from "../../hooks/useGame.jsx";
|
import { useGame } from "../../hooks/useGame.jsx";
|
||||||
import MoveAround from "./MoveAround.jsx";
|
import MoveAround from "./MoveAround.jsx";
|
||||||
|
|
@ -12,9 +12,11 @@ export default function Tutorials() {
|
||||||
|
|
||||||
function setNextSlide() {
|
function setNextSlide() {
|
||||||
setActiveSlide(activeSlide + 1);
|
setActiveSlide(activeSlide + 1);
|
||||||
|
document.querySelector("dialog").scrollTo(0, 0);
|
||||||
}
|
}
|
||||||
function setPreviousSlide() {
|
function setPreviousSlide() {
|
||||||
setActiveSlide(activeSlide - 1);
|
setActiveSlide(activeSlide - 1);
|
||||||
|
document.querySelector("dialog").scrollTo(0, 0);
|
||||||
}
|
}
|
||||||
function startGame() {
|
function startGame() {
|
||||||
setIsTimeRuning(true);
|
setIsTimeRuning(true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user