scroll to top after change step
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
import { useEffect } from "react";
|
||||||
|
|
||||||
|
function ScrollToTop() {
|
||||||
|
useEffect(() => window.scrollTo(0, 0), []);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ScrollToTop;
|
||||||
@@ -2,10 +2,12 @@ import ArrowLeftPA from "@/components/icons/ArrowLeftPA";
|
|||||||
import { Button } from "@mui/material";
|
import { Button } from "@mui/material";
|
||||||
import Form from "./Form";
|
import Form from "./Form";
|
||||||
import { checkAllValues } from "@/helper";
|
import { checkAllValues } from "@/helper";
|
||||||
|
import ScrollToTop from "@/app/component/ScrollToTop";
|
||||||
|
|
||||||
function OfficeInformation({ setValue, parent, data, setData }) {
|
function OfficeInformation({ setValue, parent, data, setData }) {
|
||||||
return (
|
return (
|
||||||
<div className="opacity-page pb-[24px] px-0 md:px-[24px] lg:px-[56px]">
|
<div className="opacity-page pb-[24px] px-0 md:px-[24px] lg:px-[56px]">
|
||||||
|
<ScrollToTop />
|
||||||
<Form parent={parent} setData={setData} data={data.office} />
|
<Form parent={parent} setData={setData} data={data.office} />
|
||||||
<div className="mt-[40px] w-full flex justify-end">
|
<div className="mt-[40px] w-full flex justify-end">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -2,12 +2,14 @@ import { Button } from "@mui/material";
|
|||||||
import List from "./List";
|
import List from "./List";
|
||||||
import ArrowLeftWhiteD from "@/components/icons/ArrowLeftWhiteD";
|
import ArrowLeftWhiteD from "@/components/icons/ArrowLeftWhiteD";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import ScrollToTop from "@/app/component/ScrollToTop";
|
||||||
|
|
||||||
function WorkingDays({ parent, data, setData }) {
|
function WorkingDays({ parent, data, setData }) {
|
||||||
const [isDisable, setIsDisable] = useState(true);
|
const [isDisable, setIsDisable] = useState(true);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="opacity-page pb-[24px]">
|
<div className="opacity-page pb-[24px]">
|
||||||
|
<ScrollToTop />
|
||||||
<p className="text-[#525252] dark:text-[#D7D8ED] text-[14px] md:text-[16px] text-center md:text-start font-bold">
|
<p className="text-[#525252] dark:text-[#D7D8ED] text-[14px] md:text-[16px] text-center md:text-start font-bold">
|
||||||
لیست روزهای کاری
|
لیست روزهای کاری
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user