From 059d17ea0e38249a5d31144216d0fdde6e611177 Mon Sep 17 00:00:00 2001 From: pipisebastian Date: Mon, 25 Nov 2024 16:26:43 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20accessToken=EB=8F=84=20=EC=84=B8?= =?UTF-8?q?=EC=85=98=EC=8A=A4=ED=86=A0=EB=A6=AC=EC=A7=80=EC=97=90=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #189 --- client/src/App.tsx | 10 ---------- client/src/stores/useUserStore.ts | 1 + 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index 98190cc3..8b120498 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,6 +1,4 @@ -import { useRefreshQuery } from "@apis/auth"; import { useErrorStore } from "@stores/useErrorStore"; -import { useUserInfo } from "@stores/useUserStore"; import { useEffect } from "react"; import { ErrorModal } from "@components/modal/ErrorModal"; import { WorkSpace } from "@features/workSpace/WorkSpace"; @@ -8,16 +6,8 @@ import { useSocketStore } from "./stores/useSocketStore"; const App = () => { // TODO 라우터, react query 설정 - const { id, name, accessToken } = useUserInfo(); - const { refetch: refreshToken } = useRefreshQuery(); const { isErrorModalOpen, errorMessage } = useErrorStore(); - useEffect(() => { - if (id && name && !accessToken) { - refreshToken(); - } - }, []); - useEffect(() => { const socketStore = useSocketStore.getState(); socketStore.init(); diff --git a/client/src/stores/useUserStore.ts b/client/src/stores/useUserStore.ts index b50f0853..243595a3 100644 --- a/client/src/stores/useUserStore.ts +++ b/client/src/stores/useUserStore.ts @@ -49,6 +49,7 @@ export const useUserStore = create()( partialize: (state) => ({ id: state.id, name: state.name, + accessToken: state.accessToken, }), }, ),