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, }), }, ),