diff --git a/README.md b/README.md index 0f50755..77a331b 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,6 @@ GlowTales-Client ┣ public ┣ src ┃ ┣ apis - ┃ ┣ assets ┃ ┣ components ┃ ┃ ┣ common ┃ ┃ ┣ learn diff --git a/package.json b/package.json index 3b62894..b398ea5 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,7 @@ "react-icons": "^5.3.0", "react-responsive": "^10.0.0", "react-router-dom": "^6.26.1", - "styled-components": "^6.1.12", - "zustand": "^4.5.5" + "styled-components": "^6.1.12" }, "devDependencies": { "@chromatic-com/storybook": "^1.6.1", diff --git a/src/apis/authAxois.ts b/src/apis/authAxois.ts index a9d8afc..1cea2a5 100644 --- a/src/apis/authAxois.ts +++ b/src/apis/authAxois.ts @@ -55,11 +55,6 @@ export const getAuthAxios = (token: string | null) => { }, async (error) => { throw error; - // alert("토큰이 만료되었습니다. 재로그인 후 시도해주세요!"); - // LocalStorage.removeItem("access"); - // LocalStorage.removeItem("refresh"); - // window.location.href = "/login"; - // return Promise.reject(error); // 에러 전달 } ); diff --git a/src/apis/createTales.ts b/src/apis/createTales.ts index 28f4126..1679d94 100644 --- a/src/apis/createTales.ts +++ b/src/apis/createTales.ts @@ -1,7 +1,6 @@ import LocalStorage from "@utils/localStorage"; import { getAuthAxios } from "./authAxois"; import { CreateTaleData } from "@type/createTale"; -// import { Server } from "./settings"; const baseURL = import.meta.env.VITE_PUBLIC_SERVER_URL; diff --git a/src/apis/settings.ts b/src/apis/settings.ts deleted file mode 100644 index 55dba66..0000000 --- a/src/apis/settings.ts +++ /dev/null @@ -1,25 +0,0 @@ -import axios from "axios"; - -export const Server = axios.create({ - baseURL: import.meta.env.VITE_PUBLIC_SERVER_URL, - timeout: 3000, - headers: { "Content-Type": "application/json" }, -}); - -Server.interceptors.request.use( - (config) => { - return config; - }, - (error) => { - return Promise.reject(error); - } -); - -Server.interceptors.response.use( - (response) => { - return response; - }, - (error) => { - return Promise.reject(error); - } -); diff --git a/src/assets/react.svg b/src/assets/react.svg deleted file mode 100644 index 6c87de9..0000000 --- a/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/learn/TaleLearn.tsx b/src/components/learn/TaleLearn.tsx index 283d4da..65a0cb4 100644 --- a/src/components/learn/TaleLearn.tsx +++ b/src/components/learn/TaleLearn.tsx @@ -60,7 +60,7 @@ const TaleLearn = ({ quizData }: TaleLearnProps) => { const postResult = async (languageTaleId: number, answerCounts: number) => { try { const response = await postAnswerCount(languageTaleId, answerCounts); - console.log(response); + return response.data } catch (error) { console.error("Error fetching data:", error); } diff --git a/src/pages/TaleLearnPage.tsx b/src/pages/TaleLearnPage.tsx index d59e8f6..6110c3a 100644 --- a/src/pages/TaleLearnPage.tsx +++ b/src/pages/TaleLearnPage.tsx @@ -9,8 +9,6 @@ const TaleLearnPage = () => { const location = useLocation(); const id = location.state || {}; - console.log(id); - useEffect(() => { const getQuiz = async (taleId: number) => { const response = await getQuizAndAnswer(taleId); diff --git a/src/type/dropdown.d.ts b/src/type/dropdown.d.ts index b15087a..108be86 100644 --- a/src/type/dropdown.d.ts +++ b/src/type/dropdown.d.ts @@ -5,7 +5,7 @@ export interface DropdownProps { } export interface DropdownElement { - imgURL?: string; // 앞에 로고 들어가야 하는 경우 경로 넣기 - text: string; // 드랍다운에 작성될 텍스트 - value: string | number | null; // 실제 들어갈 값 + imgURL?: string; + text: string; + value: string | number | null; }