diff --git a/CLAUDE.md b/CLAUDE.md index c11a6756..b87f08ed 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -34,6 +34,11 @@ CI 파이프라인: lint → typecheck → prettier → build → build-storyboo ### API 레이어 +**백엔드 API 문서 (Swagger):** + +- 스테이징: https://test-api.zeroone.it.kr/v3/api-docs +- Swagger UI: https://test-api.zeroone.it.kr/swagger-ui/index.html + 두 가지 통신 패턴이 공존: 1. **레거시 axios** (`src/api/client/axios.ts`): baseURL `/api/v1/`, 토큰 갱신 큐 구현 (AUTH001 에러 시 갱신 트리거). 커스텀 엔드포인트에 사용. diff --git a/src/app/(service)/layout.tsx b/src/app/(service)/layout.tsx index d99c0c6e..0a3e3da3 100644 --- a/src/app/(service)/layout.tsx +++ b/src/app/(service)/layout.tsx @@ -7,6 +7,7 @@ import type { Metadata } from 'next'; import localFont from 'next/font/local'; import React from 'react'; import PageViewTracker from '@/components/analytics/page-view-tracker'; +import GlobalToast from '@/components/ui/global-toast'; import MainProvider from '@/providers'; import Header from '@/widgets/home/header'; @@ -41,6 +42,7 @@ export default function ServiceLayout({
{GTM_ID &&+
{evaluation.comment}
{review.comment}
++ {review.comment} +
)} ); diff --git a/src/components/modals/create-evaluation-modal.tsx b/src/components/modals/create-evaluation-modal.tsx index 22fcdb5a..b10c198b 100644 --- a/src/components/modals/create-evaluation-modal.tsx +++ b/src/components/modals/create-evaluation-modal.tsx @@ -11,6 +11,7 @@ import { useCreateEvaluation, useGetMissionEvaluationGrades, } from '@/hooks/queries/evaluation-api'; +import { useToastStore } from '@/stores/use-toast-store'; import { TextAreaInput } from '../ui/input'; const CreateEvaluationFormSchema = z.object({ @@ -89,6 +90,7 @@ function CreateEvaluationForm({ const { data: grades } = useGetMissionEvaluationGrades(); const { mutate: createEvaluation } = useCreateEvaluation(); + const showToast = useToastStore((state) => state.showToast); const onValidSubmit = (values: CreateEvaluationFormValues) => { createEvaluation( @@ -98,11 +100,11 @@ function CreateEvaluationForm({ }, { onSuccess: () => { - alert('평가가 성공적으로 제출되었습니다!'); + showToast('평가가 성공적으로 제출되었습니다!'); onClose(); }, onError: () => { - alert('평가 제출에 실패했습니다. 다시 시도해주세요.'); + showToast('평가 제출에 실패했습니다. 다시 시도해주세요.', 'error'); }, }, ); diff --git a/src/components/modals/create-mission-modal.tsx b/src/components/modals/create-mission-modal.tsx index 2d265e82..ffd5c251 100644 --- a/src/components/modals/create-mission-modal.tsx +++ b/src/components/modals/create-mission-modal.tsx @@ -11,6 +11,7 @@ import { BaseInput, TextAreaInput } from '@/components/ui/input'; import { Modal } from '@/components/ui/modal'; import { useGroupStudyDetailQuery } from '@/features/study/group/model/use-study-query'; import { useCreateMission, useGetMissions } from '@/hooks/queries/mission-api'; +import { useToastStore } from '@/stores/use-toast-store'; import { createDisabledDateMatcherForMission, MissionPeriod, @@ -129,6 +130,7 @@ function CreateMissionForm({ const { handleSubmit, formState, control } = methods; const { mutate: createMission } = useCreateMission(); + const showToast = useToastStore((state) => state.showToast); const onValidSubmit = (values: CreateMissionFormValues) => { const startDate = dayjs(values.dateRange.from).format('YYYY-MM-DD'); @@ -148,11 +150,11 @@ function CreateMissionForm({ }, { onSuccess: () => { - alert('미션이 성공적으로 생성되었습니다!'); + showToast('미션이 성공적으로 생성되었습니다!'); onClose(); }, onError: () => { - alert('미션 생성에 실패했습니다. 다시 시도해주세요.'); + showToast('미션 생성에 실패했습니다. 다시 시도해주세요.', 'error'); }, }, ); diff --git a/src/components/modals/delete-evaluation-modal.tsx b/src/components/modals/delete-evaluation-modal.tsx index 8183c177..15c13582 100644 --- a/src/components/modals/delete-evaluation-modal.tsx +++ b/src/components/modals/delete-evaluation-modal.tsx @@ -1,5 +1,6 @@ import { useState } from 'react'; import { useDeleteEvaluation } from '@/hooks/queries/evaluation-api'; +import { useToastStore } from '@/stores/use-toast-store'; import Button from '../ui/button'; import { Modal } from '../ui/modal'; @@ -14,15 +15,16 @@ export default function DeleteEvaluationModal({ const [open, setOpen] = useState