handle limit page dashboard & change header profile user & get data from api in page clinics & clinic item and doctor item

This commit is contained in:
Ehsan
2025-06-01 01:08:25 +03:30
parent 80c74361eb
commit e292176a61
45 changed files with 223 additions and 258 deletions
@@ -1,5 +1,4 @@
import { Button } from "@mui/material";
import { useRouter } from "next/navigation";
import { request } from "@/services/response";
import Cookies from "js-cookie";
@@ -12,8 +11,6 @@ function SendReq({
setIsError,
uuid,
}) {
const router = useRouter();
const handleSetCookie = (response) => {
const accessTokenExpires = new Date();
accessTokenExpires.setSeconds(
@@ -50,7 +47,7 @@ function SendReq({
.then((response) => {
setLoading(false);
if (response.access_token) {
router.replace("/");
window.location.pathname = "/";
handleSetCookie(response);
}
})