-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Input 컴포넌트 type="number" 일때 표시되는 버튼 제거 * refactor: 모임 상세 퍼널 스텝 스타일 수정, 성능개선, 기능 추가 - CustomMemberCountField의 Input 컴포넌트 after 스타일 추가 - watch를 useWatch()로 대체 - SetUpDetailStepValues에 FormValues 추가(book, queryKeyword) - SelectedBookInfoField에 bookId 받을 수 있도록 수정 * refactor: 폴더 구조 변경 * fix: 모임 상세 퍼널 스토리 수정 * chore: /bookGroup/create/funnel/index.ts 변경사항 업데이트 - 불필요한 코드이지만 컨플릭트날것을 대비하여 우선 업데이트 합니다. - 이후 Funnel 작업 시 제거합니다. * fix: 모임상세 스텝 스토리 수정 - FormValues에 누락 된 customMemberCount 추가 - onNextStep 이벤트에 alert 추가 * fix: 불필요한 코드 삭제 및 수정
- Loading branch information
Showing
6 changed files
with
129 additions
and
72 deletions.
There are no files selected for viewing
50 changes: 0 additions & 50 deletions
50
src/stories/bookGroup/create/funnel/SetUpDetailStep.stories.tsx
This file was deleted.
Oops, something went wrong.
72 changes: 72 additions & 0 deletions
72
src/stories/bookGroup/create/steps/SetUpDetailStep.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { appLayoutMeta } from '@/stories/meta'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import { FormProvider, useForm } from 'react-hook-form'; | ||
|
||
import { getTodayDate } from '@/utils/date'; | ||
|
||
import { | ||
SetUpDetailStep, | ||
type SetUpDetailStepValues, | ||
} from '@/v1/bookGroup/create/steps/SetUpDetailStep'; | ||
|
||
const meta: Meta<typeof SetUpDetailStep> = { | ||
title: 'bookGroup/create/steps/SetUpDetailStep', | ||
component: SetUpDetailStep, | ||
...appLayoutMeta, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof SetUpDetailStep>; | ||
|
||
const SetUpDetailForm = () => { | ||
const methods = useForm<SetUpDetailStepValues>({ | ||
mode: 'all', | ||
defaultValues: { | ||
title: '', | ||
book: { | ||
bookId: 23, | ||
}, | ||
introduce: '', | ||
maxMemberCount: '', | ||
customMemberCount: '', | ||
startDate: getTodayDate(), | ||
endDate: '', | ||
isPublic: false, | ||
}, | ||
}); | ||
|
||
const onNextStep = () => { | ||
const { | ||
book, | ||
title, | ||
introduce, | ||
maxMemberCount, | ||
customMemberCount, | ||
startDate, | ||
endDate, | ||
isPublic, | ||
} = methods.getValues(); | ||
alert(` | ||
bookId: ${book.bookId}, | ||
title: ${title}, | ||
introduce: ${introduce}, | ||
maxMemberCount: ${maxMemberCount}, | ||
customMemberCount: ${customMemberCount}, | ||
startDate: ${startDate}, | ||
endDate: ${endDate}, | ||
isPublic: ${isPublic}`); | ||
}; | ||
|
||
return ( | ||
<FormProvider {...methods}> | ||
<form> | ||
<SetUpDetailStep onNextStep={onNextStep} /> | ||
</form> | ||
</FormProvider> | ||
); | ||
}; | ||
|
||
export const Default: Story = { | ||
render: () => <SetUpDetailForm />, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// export { default as SelectBookStep } from './SelectBookStep'; | ||
export { default as SetUpDetailStep } from './SetUpDetailStep'; | ||
export { default as SetUpDetailStep } from '../steps/SetUpDetailStep/SetUpDetailStep'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export type { SetUpDetailStepValues } from './SetUpDetailStep'; | ||
export { default as SetUpDetailStep } from './SetUpDetailStep'; |