Skip to content

Commit

Permalink
refactor: 글쓰기 분야 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
semnil5202 committed Dec 3, 2024
1 parent 51e2492 commit 3329d1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pages/WriteEdit/WriteEdit.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ const WriteEditPage = () => {
);

const [isOpenBranchBottomSheet, setIsOpenBranchBottomSheet] = useState(false);
// TODO: ideaDetail branchList API DTO 수정 후 진행
const [selectedBranch1Depth, setSelectedBranch1Depth] = useState(branchesResponses[0].name);
const [selectedBranchResponses, setSelectedBranchResponses] = useState<Info[]>([]);
const [selectedBranchResponses, setSelectedBranchResponses] = useState<Info[]>(
branchesResponses
.map((item) => item.branchResponses)
.flat()
.filter((item) => ideaDetail.branchList.includes(item.name)),
);

const { checkboxValue, selectedCheckboxId, onChangeCheckbox } = useCheckbox({
purposes: purposesResponses.map((item) => ({ checked: ideaDetail.purposeList.includes(item.name), ...item })),
Expand Down

0 comments on commit 3329d1d

Please sign in to comment.