From 112167c294668d50c990a1810df47cacad069ba6 Mon Sep 17 00:00:00 2001 From: nakyong82 Date: Wed, 11 Dec 2024 23:34:56 +0900 Subject: [PATCH] =?UTF-8?q?:bug:=20fix:=20=EA=B3=B5=EA=B3=A0=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EC=8B=9C=203=EB=B2=88=EC=A7=B8=20=EC=A7=80?= =?UTF-8?q?=EC=97=AD=20=EC=84=A0=ED=83=9D=20=EC=84=B9=EC=85=98=EC=97=90?= =?UTF-8?q?=EC=84=9C=20'=EC=A0=84=EC=B2=B4'=20=EC=B6=94=EA=B0=80=ED=95=98?= =?UTF-8?q?=EA=B8=B0=20#132?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PostSearchFilter/PostSearchFilterArea.tsx | 2 +- src/utils/formatSearchFilter.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/PostSearchFilter/PostSearchFilterArea.tsx b/src/components/PostSearchFilter/PostSearchFilterArea.tsx index 49391814..8678632e 100644 --- a/src/components/PostSearchFilter/PostSearchFilterArea.tsx +++ b/src/components/PostSearchFilter/PostSearchFilterArea.tsx @@ -81,7 +81,7 @@ const PostSearchFilterArea = ({ const isValidRegionData = REGION_DATA[region1Depth]; if (isValidRegionData && isValidRegionData[region]) { - setRegion3DepthData(isValidRegionData[region]); + setRegion3DepthData(['전체', ...isValidRegionData[region]]); } else { setRegion3DepthData([]); } diff --git a/src/utils/formatSearchFilter.ts b/src/utils/formatSearchFilter.ts index 73391625..1087ebbf 100644 --- a/src/utils/formatSearchFilter.ts +++ b/src/utils/formatSearchFilter.ts @@ -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(',')