From e8817b868a7935e34084a2359fea6a5148c62226 Mon Sep 17 00:00:00 2001 From: psyeon1120 Date: Wed, 6 Dec 2023 02:22:53 +0900 Subject: [PATCH] =?UTF-8?q?[PDW-76]=20fix:=20=EB=A1=9C=EA=B7=B8=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/admin/office/OfficeManageAdd.js | 2 +- src/pages/basic/booking/office/SelectOffice.js | 2 +- src/utils/CookiesUtil.js | 2 ++ src/utils/ErrorHandlerUtil.js | 7 +++---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pages/admin/office/OfficeManageAdd.js b/src/pages/admin/office/OfficeManageAdd.js index c05960c..1a66154 100644 --- a/src/pages/admin/office/OfficeManageAdd.js +++ b/src/pages/admin/office/OfficeManageAdd.js @@ -339,7 +339,7 @@ function OfficeManageAdd(props) { } }, []) - // 책임자 리스트 검색 + // 시설 리스트 검색 const getFacilityList = () => { AdminOfficesAxios.get(`facilities?name=${searchWord}`, { headers: { diff --git a/src/pages/basic/booking/office/SelectOffice.js b/src/pages/basic/booking/office/SelectOffice.js index 026850d..40649c2 100644 --- a/src/pages/basic/booking/office/SelectOffice.js +++ b/src/pages/basic/booking/office/SelectOffice.js @@ -50,7 +50,7 @@ function SelectOffice(props) { const searchOffice = () => { let url = `?facilityName=${facilityName.current}` if (date !== "") - url = `?facilityName=${facilityName.current}&date=${date}&startTime=${startTime}&endTime=${endTime}` + url = `?facilityName=${facilityName.current}&date=${date}&startTime=${startTime}&endTime=${endTime}&size=200` OfficesAxios.get(url, { headers: { Authorization: getToken() diff --git a/src/utils/CookiesUtil.js b/src/utils/CookiesUtil.js index a48934e..ca32ae2 100644 --- a/src/utils/CookiesUtil.js +++ b/src/utils/CookiesUtil.js @@ -20,4 +20,6 @@ export const removeAllCookies = () => { Object.keys(cookieKeys).forEach(key => { cookies.remove(key) }) + + window.location.replace('/') } \ No newline at end of file diff --git a/src/utils/ErrorHandlerUtil.js b/src/utils/ErrorHandlerUtil.js index b00533f..6c65909 100644 --- a/src/utils/ErrorHandlerUtil.js +++ b/src/utils/ErrorHandlerUtil.js @@ -1,4 +1,5 @@ import { removeTokenAndNavigate, isLogin } from "utils/IsLoginUtil" +import {removeAllCookies} from "./CookiesUtil"; // 일반 예외처리 export function basicError(error) { @@ -12,8 +13,7 @@ export function basicError(error) { // 토큰에러인 경우 쿠키 삭제 (토큰 에러를 두번 alert 하지 않기 위해 토큰 존재 여부 판단) if (String(error.response.data.code).startsWith('T')) { - alert(errMsg) - removeTokenAndNavigate() + removeAllCookies() } } else { console.log(error) @@ -37,8 +37,7 @@ export function notLogInError(error) { // 토큰에러인 경우 쿠키 삭제 (토큰 에러를 두번 alert 하지 않기 위해 토큰 존재 여부 판단) if (String(error.response.data.code).startsWith('T') && isLogin()) { - alert(errMsg) - removeTokenAndNavigate() + removeAllCookies() } } else { console.log(error)