From 22f75cbab0ec0733d099ce3046abe69e2a80eb9a Mon Sep 17 00:00:00 2001 From: seoyeon08 Date: Thu, 4 Jul 2024 16:50:41 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=ED=8C=8C=EC=9D=BC=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC=20=EB=B0=8F=20url=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/apiClient.ts | 29 ++++++++++------------------- src/apis/url.ts | 3 +-- src/pages/mypage/MyPage.tsx | 3 ++- src/types/calendarData.d.ts | 4 ---- src/types/lesson.d.ts | 5 +++++ src/types/monthSales.d.ts | 5 ----- 6 files changed, 18 insertions(+), 31 deletions(-) delete mode 100644 src/types/calendarData.d.ts delete mode 100644 src/types/monthSales.d.ts diff --git a/src/apis/apiClient.ts b/src/apis/apiClient.ts index 6326a68..8270741 100644 --- a/src/apis/apiClient.ts +++ b/src/apis/apiClient.ts @@ -51,6 +51,16 @@ export class ApiClient return response.data; } + async getPoint() { + const response = await this.axiosInstance.request< + BaseResponseType + >({ + method: 'get', + url: '/user/point', + }); + return response.data; + } + // ------- account ------- async getAccountList() { const response = await this.axiosInstance.request< @@ -134,23 +144,6 @@ export class ApiClient return response.data; } - // ------- mypage ------- - - // 하나머니 조회 - async getPoint() { - const response = await this.axiosInstance.request< - BaseResponseType - >({ - method: 'get', - url: '/user/point', - }); - return response.data; - } - - //---------host--------- - - //---------account--------- - //---------transaction--------- async postQrPay(reqData: QrPayReqType) { const response = await this.axiosInstance.request< @@ -192,8 +185,6 @@ export class ApiClient return response.data; } - //---------category--------- - //---------lesson--------- // 클래스 상세 diff --git a/src/apis/url.ts b/src/apis/url.ts index 6aa63f3..5cbfdac 100644 --- a/src/apis/url.ts +++ b/src/apis/url.ts @@ -1,2 +1 @@ -export const API_BASE_URL = 'http://43.200.46.175:8080'; -// export const API_BASE_URL = 'http://localhost:8080'; +export const API_BASE_URL = 'https://hanafun.kro.kr'; diff --git a/src/pages/mypage/MyPage.tsx b/src/pages/mypage/MyPage.tsx index b639d88..68a5a81 100644 --- a/src/pages/mypage/MyPage.tsx +++ b/src/pages/mypage/MyPage.tsx @@ -7,9 +7,10 @@ import { useQuery } from '@tanstack/react-query'; import { NotFindMyLesson } from '../../components/molecules/NotFindMyLesson'; import { Loading } from '../Loading'; import { ErrorPage } from '../ErrorPage'; +import { getCookie } from '../../utils/cookie'; const MyPage = () => { - const username = '오감자'; + const username = getCookie('username'); const navigate = useNavigate(); const handleNavigate = () => { diff --git a/src/types/calendarData.d.ts b/src/types/calendarData.d.ts deleted file mode 100644 index aa262b8..0000000 --- a/src/types/calendarData.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -interface CalendarDataType { - lesson_id: number; - date: string; -} diff --git a/src/types/lesson.d.ts b/src/types/lesson.d.ts index 870b642..8cc9522 100644 --- a/src/types/lesson.d.ts +++ b/src/types/lesson.d.ts @@ -37,3 +37,8 @@ interface CreateLessonReqType { materials: string; lessonDate: LessonDateCommonType[]; } + +interface CalendarDataType { + lesson_id: number; + date: string; +} diff --git a/src/types/monthSales.d.ts b/src/types/monthSales.d.ts deleted file mode 100644 index db89b62..0000000 --- a/src/types/monthSales.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -interface MonthSalesType { - lesson_id: number; - title: string; - revenue: number; -}