diff --git a/app/component/ScrollToTop.js b/app/component/ScrollToTop.js new file mode 100644 index 0000000..2a6eee0 --- /dev/null +++ b/app/component/ScrollToTop.js @@ -0,0 +1,8 @@ +import { useEffect } from "react"; + +function ScrollToTop() { + useEffect(() => window.scrollTo(0, 0), []); + return; +} + +export default ScrollToTop; diff --git a/components/panel/addDoctor/listMenu/officeInformation/index.js b/components/panel/addDoctor/listMenu/officeInformation/index.js index 470f06c..1e5eac4 100644 --- a/components/panel/addDoctor/listMenu/officeInformation/index.js +++ b/components/panel/addDoctor/listMenu/officeInformation/index.js @@ -2,10 +2,12 @@ import ArrowLeftPA from "@/components/icons/ArrowLeftPA"; import { Button } from "@mui/material"; import Form from "./Form"; import { checkAllValues } from "@/helper"; +import ScrollToTop from "@/app/component/ScrollToTop"; function OfficeInformation({ setValue, parent, data, setData }) { return (
+