diff --git a/apps/wiki/apis/index.ts b/apps/wiki/apis/index.ts index 15370fc..c9500d6 100644 --- a/apps/wiki/apis/index.ts +++ b/apps/wiki/apis/index.ts @@ -1,7 +1,6 @@ import axios from "axios"; -import { ERROR, TOKEN } from "@/constants"; -import { Storage } from "@/storage"; -import { refreshToken } from "./header"; +import { ERROR } from "@/constants"; +import { refresh } from "@/services/auth/auth.api"; export const http = axios.create({ baseURL: process.env.NEXT_PUBLIC_SERVER_URL, @@ -23,9 +22,3 @@ http.interceptors.response.use( return Promise.reject(error); }, ); - -const refresh = async () => { - const { data } = await http.put("/auth/refresh/access", null, refreshToken()); - Storage.setItem(TOKEN.ACCESS, data.accessToken); - return data.accessToken; -}; diff --git a/apps/wiki/app/history/[title]/History.tsx b/apps/wiki/app/history/[title]/History.tsx index 3b4aefd..5b02cad 100644 --- a/apps/wiki/app/history/[title]/History.tsx +++ b/apps/wiki/app/history/[title]/History.tsx @@ -10,26 +10,25 @@ import * as styles from "./style.css"; const History = ({ title }: { title: string }) => { const { formatDate } = useDate(); - const { data: historyList } = useSuspenseQuery(historyQuery.list(title)); - const decodeTitle = decodeURI(title); + const { data: history } = useSuspenseQuery(historyQuery.list(title)); return ( - - {historyList.versionDocsResponseDto.map((history) => ( + + {history.versionDocsResponseDto.map((docsHistory) => (
-

#{history.index}

+

#{docsHistory.index}

- 작성자 · {history.nickName} + 작성자 · {docsHistory.nickName} ))}
diff --git a/apps/wiki/components/Popular/Popular.tsx b/apps/wiki/components/Popular/Popular.tsx index ac276ab..b2dc56c 100644 --- a/apps/wiki/components/Popular/Popular.tsx +++ b/apps/wiki/components/Popular/Popular.tsx @@ -24,7 +24,7 @@ const Popular = () => { >
인기