diff --git a/src/api/index.ts b/src/api/index.ts index 895dbc1..a97ba03 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -34,6 +34,7 @@ refreshInstance.interceptors.request.use( }, (error: AxiosError) => Promise.reject(error) ); + instance.interceptors.response.use( (response) => response, async (error: AxiosError) => { @@ -56,8 +57,6 @@ instance.interceptors.response.use( .catch(() => { window.location.href = "login"; }); - { - } } catch (refreshError) { return Promise.reject(refreshError); } diff --git a/src/app/main/page.tsx b/src/app/main/page.tsx index 2b59bd5..623d7b3 100644 --- a/src/app/main/page.tsx +++ b/src/app/main/page.tsx @@ -10,11 +10,9 @@ import attendanceImg from "@/assets/svg/attendance.svg"; import outingImg from "@/assets/svg/outing.svg"; import moveClassImg from "@/assets/svg/moveClass.svg"; import BugImg from "@/assets/svg/bug.svg"; -import Survey from "@/components/survey"; const Main = () => { const [floor, setFloor] = useState(); - const [surveyModal, setSurveyModal] = useState(false); const { data: getDirector } = GetTodaydirector(); GetName(); @@ -22,13 +20,6 @@ const Main = () => { if (getDirector) setFloor(getDirector); }, [getDirector]); - useEffect(() => { - const check = localStorage.getItem("survey"); - if (check !== "OK") { - setSurveyModal(true); - } - }, []); - return ( <>
@@ -50,13 +41,6 @@ const Main = () => { - {surveyModal && ( - { - setSurveyModal(false); - }} - /> - )} ); diff --git a/src/components/survey/index.tsx b/src/components/survey/index.tsx deleted file mode 100644 index bf3018e..0000000 --- a/src/components/survey/index.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { useState } from "react"; - -interface SurveyProp { - onClick: () => void; -} - -const Survey = ({ onClick }: SurveyProp) => { - const [isChecked, setIsChecked] = useState(false); - - const handleCheckboxChange = () => { - setIsChecked(!isChecked); - if (!isChecked) { - localStorage.setItem("survey", "OK"); - } else { - localStorage.removeItem("survey"); - } - }; - return ( -
-
-
-
- 픽 만족도 조사하기 -
-
- 좀 더 좋은 PiCK으로 업데이트를 위해 만족도 조사를 하려고 합니다. -
- 많은 참여 부탁드립니다 -
-
- - 만족도 조사하기 - -
-
- - -
-
- 닫기 -
-
-
-
- ); -}; - -export default Survey;