Skip to content

Commit

Permalink
🐛 fix: 공고 검색 시 3번째 지역 선택 섹션에서 '전체' 추가하기 #132
Browse files Browse the repository at this point in the history
  • Loading branch information
naarang committed Dec 11, 2024
1 parent 2c6eff4 commit 112167c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/PostSearchFilter/PostSearchFilterArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const PostSearchFilterArea = ({

const isValidRegionData = REGION_DATA[region1Depth];
if (isValidRegionData && isValidRegionData[region]) {
setRegion3DepthData(isValidRegionData[region]);
setRegion3DepthData(['전체', ...isValidRegionData[region]]);
} else {
setRegion3DepthData([]);
}
Expand Down
6 changes: 4 additions & 2 deletions src/utils/formatSearchFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ export const formatSearchFilter = (
search: searchText ?? null,
sorting: sortType,
region_1depth: filterList[FILTER_CATEGORY.REGION_1DEPTH].join(','),
region_2depth: filterList[FILTER_CATEGORY.REGION_2DEPTH].join(','),
region_2depth: filterList[FILTER_CATEGORY.REGION_2DEPTH]
.map((value) => (value === '전체' ? 'none' : value))
.join(','),
region_3depth: filterList[FILTER_CATEGORY.REGION_3DEPTH]
.map((value) => (value === '' ? 'none' : value))
.map((value) => (value === '' || value === '전체' ? 'none' : value))
.join(','),
industry: filterList[FILTER_CATEGORY.INDUSTRY]
.join(',')
Expand Down

0 comments on commit 112167c

Please sign in to comment.