From 91bf7f20677af2058ad8c59235c2faecde452152 Mon Sep 17 00:00:00 2001 From: aken-you Date: Sat, 2 Aug 2025 17:18:55 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20FE=20=ED=94=84=EB=A1=A0?= =?UTF-8?q?=ED=8A=B8=20=EC=84=9C=EB=B2=84=EC=97=90=EC=84=9C=20NEXT=5FPUBLI?= =?UTF-8?q?C=5FGTM=5FID=20=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-dev.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index d54c21e5..54b9edab 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -53,7 +53,6 @@ jobs: echo ".env 파일 생성" echo "NEXT_PUBLIC_API_BASE_URL=${{ secrets.NEXT_PUBLIC_API_BASE_URL }}" > .env - echo "NEXT_PUBLIC_GTM_ID=${{ secrets.NEXT_PUBLIC_GTM_ID }}" >> .env echo "NEXT_PUBLIC_KAKAO_CLIENT_ID=${{ secrets.NEXT_PUBLIC_KAKAO_CLIENT_ID }}" >> .env echo "NEXT_PUBLIC_GOOGLE_CLIENT_ID=${{ secrets.NEXT_PUBLIC_GOOGLE_CLIENT_ID }}" >> .env From 5b22519d25b30905e8eb62169d7b4465d1f467f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EB=AF=BC=EC=A3=BC?= Date: Tue, 5 Aug 2025 17:10:40 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EC=8A=A4=ED=84=B0=EB=94=94=20?= =?UTF-8?q?=EC=B0=B8=EA=B0=80=20=EC=97=AC=EB=B6=80=20api=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/study/api/get-study-data.ts | 5 ++--- src/features/study/api/types.ts | 6 ------ src/features/study/model/use-study-query.ts | 3 +-- src/features/study/ui/study-card.tsx | 7 +------ 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/features/study/api/get-study-data.ts b/src/features/study/api/get-study-data.ts index 570e7b4e..89f1c674 100644 --- a/src/features/study/api/get-study-data.ts +++ b/src/features/study/api/get-study-data.ts @@ -3,7 +3,6 @@ import type { DailyStudyDetail, GetDailyStudiesParams, GetDailyStudiesResponse, - GetDailyStudyDetailParams2, GetMonthlyCalendarParams, JoinStudyRequest, MonthlyCalendarResponse, @@ -87,10 +86,10 @@ export const postJoinStudy = async (payload: JoinStudyRequest) => { // 스터디 참여 유무 확인 export const getWeeklyParticipation = async ( - params: GetDailyStudyDetailParams2, + studyDate: string, ): Promise => { const res = await axiosInstance.get('/study/week/participation', { - params, + params: { studyDate }, }); return res.data.content; diff --git a/src/features/study/api/types.ts b/src/features/study/api/types.ts index 7dbf0b62..f790661b 100644 --- a/src/features/study/api/types.ts +++ b/src/features/study/api/types.ts @@ -34,12 +34,6 @@ export interface DailyStudyDetail { feedback: string; } -export interface GetDailyStudyDetailParams2 { - year: number; - month: number; - day: number; -} - export interface GetDailyStudiesParams { cursor?: number; pageSize?: number; diff --git a/src/features/study/model/use-study-query.ts b/src/features/study/model/use-study-query.ts index 72afc479..ab782631 100644 --- a/src/features/study/model/use-study-query.ts +++ b/src/features/study/model/use-study-query.ts @@ -11,7 +11,6 @@ import { import { CompleteStudyRequest, GetDailyStudiesParams, - GetDailyStudyDetailParams2, GetMonthlyCalendarParams, JoinStudyRequest, MonthlyCalendarResponse, @@ -19,7 +18,7 @@ import { } from '../api/types'; // 스터디 주간 참여 유무 확인 query -export const useWeeklyParticipation = (params: GetDailyStudyDetailParams2) => { +export const useWeeklyParticipation = (params: string) => { return useQuery({ queryKey: ['weeklyParticipation', params], queryFn: () => getWeeklyParticipation(params), diff --git a/src/features/study/ui/study-card.tsx b/src/features/study/ui/study-card.tsx index 6cb4faa4..2c8d5352 100644 --- a/src/features/study/ui/study-card.tsx +++ b/src/features/study/ui/study-card.tsx @@ -53,18 +53,13 @@ function getWeekly(date: Date): { month: number; week: number } { export default function StudyCard() { const [selectedDate, setSelectedDate] = useState(new Date()); - const params = { - year: selectedDate.getFullYear(), - month: selectedDate.getMonth() + 1, - day: selectedDate.getDate(), - }; const offset = selectedDate.getTimezoneOffset() * 60000; // ms단위라 60000곱해줌 const dateOffset = new Date(selectedDate.getTime() - offset); const studyDate = dateOffset.toISOString().split('T')[0]; - const { data: participationData } = useWeeklyParticipation(params); + const { data: participationData } = useWeeklyParticipation(studyDate); const isParticipate = participationData?.isParticipate ?? false; const { month, week } = getWeekly(selectedDate);