diff --git a/package-lock.json b/package-lock.json index bbea71db..fc8a64f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12420,6 +12420,126 @@ "optional": true } } + }, + "node_modules/@next/swc-darwin-arm64": { + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.18.tgz", + "integrity": "sha512-tOBlDHCjGdyLf0ube/rDUs6VtwNOajaWV+5FV/ajPgrvHeisllEdymY/oDgv2cx561+gJksfMUtqf8crug7sbA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.18.tgz", + "integrity": "sha512-uJCEjutt5VeJ30jjrHV1VIHCsbMYnEqytQgvREx+DjURd/fmKy15NaVK4aR/u98S1LGTnjq35lRTnRyygglxoA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.18.tgz", + "integrity": "sha512-IL6rU8vnBB+BAm6YSWZewc+qvdL1EaA+VhLQ6tlUc0xp+kkdxQrVqAnh8Zek1ccKHlTDFRyAft0e60gteYmQ4A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.18.tgz", + "integrity": "sha512-RCaENbIZqKKqTlL8KNd+AZV/yAdCsovblOpYFp0OJ7ZxgLNbV5w23CUU1G5On+0fgafrsGcW+GdMKdFjaRwyYA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.18.tgz", + "integrity": "sha512-3kmv8DlyhPRCEBM1Vavn8NjyXtMeQ49ID0Olr/Sut7pgzaQTo4h01S7Z8YNE0VtbowyuAL26ibcz0ka6xCTH5g==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.18.tgz", + "integrity": "sha512-mliTfa8seVSpTbVEcKEXGjC18+TDII8ykW4a36au97spm9XMPqQTpdGPNBJ9RySSFw9/hLuaCMByluQIAnkzlw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.18.tgz", + "integrity": "sha512-J5g0UFPbAjKYmqS3Cy7l2fetFmWMY9Oao32eUsBPYohts26BdrMUyfCJnZFQkX9npYaHNDOWqZ6uV9hSDPw9NA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-ia32-msvc": { + "version": "14.2.18", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.18.tgz", + "integrity": "sha512-Ynxuk4ZgIpdcN7d16ivJdjsDG1+3hTvK24Pp8DiDmIa2+A4CfhJSEHHVndCHok6rnLUzAZD+/UOKESQgTsAZGg==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } } } } diff --git a/src/app/(crew)/_components/hero/hero-crew.tsx b/src/app/(crew)/_components/hero/hero-crew.tsx index dd7ac7fe..969a7db9 100644 --- a/src/app/(crew)/_components/hero/hero-crew.tsx +++ b/src/app/(crew)/_components/hero/hero-crew.tsx @@ -17,7 +17,7 @@ export default function HeroCrew() { 함께할 사람이 없나요? - + 지금 크루에 참여해보세요.
diff --git a/src/app/(crew)/crew/create/_components/create-crew-form/create-crew-form.stories.tsx b/src/app/(crew)/crew/create/_components/create-crew-form/create-crew-form.stories.tsx index acc0aaaa..73e736c9 100644 --- a/src/app/(crew)/crew/create/_components/create-crew-form/create-crew-form.stories.tsx +++ b/src/app/(crew)/crew/create/_components/create-crew-form/create-crew-form.stories.tsx @@ -17,11 +17,27 @@ export default { title: 'crew/create-crew-form', component: CreateCrewForm, tags: ['autodocs'], + argTypes: { + type: { + control: 'radio', + options: ['create', 'edit'], + description: '폼 타입', + table: { type: { summary: 'create | edit' } }, + }, + data: { + control: 'object', + description: '폼 데이터', + table: { type: { summary: 'CreateCrewFormTypes' } }, + }, + isEdit: { control: 'boolean', description: '수정 여부' }, + onSubmit: { + action: 'submit', + table: { type: { summary: '(data: CreateCrewFormTypes) => void' } }, + }, + onEdit: { action: 'edit', table: { type: { summary: '(data: CreateCrewFormTypes) => void' } } }, + }, parameters: { layout: 'fullscreen', - nextjs: { - appDirectory: true, - }, docs: { description: { component: '크루 작성/수정에 사용되는 폼입니다.', diff --git a/src/app/(crew)/crew/create/_components/create-crew-form/index.tsx b/src/app/(crew)/crew/create/_components/create-crew-form/index.tsx index dc17810e..d5fb1a37 100644 --- a/src/app/(crew)/crew/create/_components/create-crew-form/index.tsx +++ b/src/app/(crew)/crew/create/_components/create-crew-form/index.tsx @@ -13,17 +13,26 @@ import DropDown from '@/src/components/common/input/drop-down'; import FileInputWrap from '@/src/components/common/input/file-input-wrap'; import TextInput from '@/src/components/common/input/text-input'; import Textarea from '@/src/components/common/input/textarea'; -import { CreateCrewFormTypes, EditCrewResponseTypes } from '@/src/types/create-crew'; +import { CreateCrewFormTypes } from '@/src/types/create-crew'; import ImgCrewSampleUrls from '@/public/assets/images/crew-sample'; export interface CreateCrewFormProps { type: 'create' | 'edit'; - data: CreateCrewFormTypes | EditCrewResponseTypes; + data: CreateCrewFormTypes; isEdit?: boolean; onEdit?: (data: CreateCrewFormTypes) => void; onSubmit?: (data: CreateCrewFormTypes) => void; } +/** + * 크루 생성/수정 폼 + * @param {'create' | 'edit'} type : form 타입 + * @param {boolean} isEdit : 수정 여부 + * @param {(data: CreateCrewFormTypes) => void} onEdit + * @param {(data: CreateCrewFormTypes) => void} onSubmit + * @param {CreateCrewFormTypes} data + */ + export default function CreateCrewForm({ type, isEdit, @@ -199,7 +208,7 @@ export default function CreateCrewForm({ field.onChange(value); handleMainCategoryChange(value); }} - error={errors.mainCategory?.message} + errorMsg={errors.mainCategory?.message} /> )} /> @@ -218,7 +227,7 @@ export default function CreateCrewForm({ placeholder={isEdit && field.value ? field.value : '세부 카테고리'} data={categoryData[categoryIndex]?.items || []} className="flex-1" - error={errors.subCategory?.message} + errorMsg={errors.subCategory?.message} /> )} /> @@ -277,7 +286,7 @@ export default function CreateCrewForm({ field.onChange(value); handleMainLocationChange(value); }} - error={errors.mainLocation?.message} + errorMsg={errors.mainLocation?.message} /> )} /> @@ -297,7 +306,7 @@ export default function CreateCrewForm({ placeholder={isEdit && field.value ? field.value : '시/군/구'} data={regionData[regionIndex]?.areas || []} className="flex-1" - error={errors.subLocation?.message} + errorMsg={errors.subLocation?.message} /> )} /> diff --git a/src/app/(crew)/crew/detail/[id]/_components/create-gathering/create-gathering-form/index.tsx b/src/app/(crew)/crew/detail/[id]/_components/create-gathering/create-gathering-form/index.tsx index bcdbdf52..a5a2f35e 100644 --- a/src/app/(crew)/crew/detail/[id]/_components/create-gathering/create-gathering-form/index.tsx +++ b/src/app/(crew)/crew/detail/[id]/_components/create-gathering/create-gathering-form/index.tsx @@ -20,6 +20,15 @@ export interface CreateGatheringFormProps { onClose: () => void; } +/** + * 약속 생성/수정 폼 + * @param {CreateGatheringFormTypes} data + * @param {boolean} isEdit + * @param {(data: CreateGatheringFormTypes) => void} onEdit + * @param {(data: CreateGatheringFormTypes) => void} onSubmit + * @param {() => void} onClose + */ + export default function CreateGatheringForm({ isEdit = false, onEdit = () => {}, diff --git a/src/app/(crew)/crew/detail/[id]/_components/crew-review-list.stories.tsx b/src/app/(crew)/crew/detail/[id]/_components/crew-review-list.stories.tsx index 934b43ab..28b97d17 100644 --- a/src/app/(crew)/crew/detail/[id]/_components/crew-review-list.stories.tsx +++ b/src/app/(crew)/crew/detail/[id]/_components/crew-review-list.stories.tsx @@ -10,9 +10,6 @@ const meta: Meta데이터가 없습니다.
-크루를 만들어서 함께 운동할 사람을 모집해보세요! 🙌
+