Skip to content

Commit

Permalink
fix-fe: orderIndex 추가 (#378)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeongwoo Park <[email protected]>
  • Loading branch information
github-actions[bot] and lurgi authored Aug 9, 2024
1 parent 1db681f commit 33181a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/hooks/useDashboardCreateForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export default function useDashboardCreateForm(): UseDashboardCreateFormReturn {
clubId,
dashboardFormInfo: {
...recruitmentInfoState,
questions: applyState,
questions: applyState.map(({ id, ...value }) => {
const temp = { ...value };
temp.choices = value.choices.map((choice, index) => ({ ...choice, orderIndex: index }));
return { ...temp, orderIndex: id };
}),
},
}),
onSuccess: async (data) => {
Expand Down

0 comments on commit 33181a4

Please sign in to comment.