From 5f139a5780866e4727c8520e539b5db999fbf759 Mon Sep 17 00:00:00 2001 From: hyuna Date: Sun, 14 Jul 2024 23:16:51 +0900 Subject: [PATCH] =?UTF-8?q?chore=20:=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/main/checkPage.tsx | 2 +- src/hook/errorHandling.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/main/checkPage.tsx b/src/components/main/checkPage.tsx index 1334a2b..36704a4 100644 --- a/src/components/main/checkPage.tsx +++ b/src/components/main/checkPage.tsx @@ -32,7 +32,7 @@ const CheckPage = ({ type }: checkPageType) => { {type === "outGoing" ? (
- 현재 외출 중인 학생은 총 + 현재 외출/조기귀가 중인 학생은 총 {list.out}명입니다.
diff --git a/src/hook/errorHandling.ts b/src/hook/errorHandling.ts index 2410e2f..e09c1cd 100644 --- a/src/hook/errorHandling.ts +++ b/src/hook/errorHandling.ts @@ -8,11 +8,14 @@ type HandleType = { }; const apiError = () => { + const router = useRouter(); const handle400: ErrorHandler = () => { alert("400 잘못된 요청입니다"); }; - const handle401: ErrorHandler = () => {}; + const handle401: ErrorHandler = () => { + router.push("login"); + }; const handle403: ErrorHandler = () => { alert("403 권한이 없습니다");