From 83a9b96c65f4fce5040004ee04f0f6fa7b5dc912 Mon Sep 17 00:00:00 2001 From: jinju Date: Sun, 10 Mar 2024 20:51:30 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[Fix/#126]:=20=EB=93=9C=EB=A1=A0=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/onboarding/droneSearch/DroneSearch.tsx | 9 ++++++++- src/components/onboarding/droneSearch/FilterLine.tsx | 6 ++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/onboarding/droneSearch/DroneSearch.tsx b/src/components/onboarding/droneSearch/DroneSearch.tsx index 8c108f6..7639f43 100644 --- a/src/components/onboarding/droneSearch/DroneSearch.tsx +++ b/src/components/onboarding/droneSearch/DroneSearch.tsx @@ -40,7 +40,7 @@ const DroneSearch: React.FC = () => { const groupFilterData = searchResults.groupInfo ? searchResults.groupInfo.map((group: any) => ({ - id: group.groupId, + id: group.name, label: group.name, filterName: '드론그룹', })) @@ -63,6 +63,13 @@ const DroneSearch: React.FC = () => { setSearchResults(res.data.data); setSearchDrones(res.data.data); console.log('드론 조회 데이터:', res.data.data); + console.log( + 'requestbody?', + searchTerm, + selectedModels, + selectedYears, + selectedGroups + ); } ); }; diff --git a/src/components/onboarding/droneSearch/FilterLine.tsx b/src/components/onboarding/droneSearch/FilterLine.tsx index 391a771..a512cc0 100644 --- a/src/components/onboarding/droneSearch/FilterLine.tsx +++ b/src/components/onboarding/droneSearch/FilterLine.tsx @@ -24,21 +24,19 @@ const FilterLine: React.FC = ({ const [selectedFilterIds, setSelectedFilterIds] = useState([]); const handleCheckboxChange = (filterId: string) => { - if (filterId === 'all' || filterId === 'r') { - const allSelected = !selectedFilterIds.includes('all' || 'r'); + if (filterId === 'all') { + const allSelected = !selectedFilterIds.includes('all'); const updatedSelectedFilterIds = allSelected ? filterData.map((item) => item.id) : []; setSelectedFilterIds(updatedSelectedFilterIds); setSelectedFilters(updatedSelectedFilterIds); - console.log('all', selectedFilters); } else { const updatedSelectedFilterIds = selectedFilterIds.includes(filterId) ? selectedFilterIds.filter((id) => id !== filterId) : [...selectedFilterIds, filterId]; setSelectedFilterIds(updatedSelectedFilterIds); setSelectedFilters(updatedSelectedFilterIds); - console.log(selectedFilters); } }; From 1de56278758665eaf2509217a604af15b555c1d3 Mon Sep 17 00:00:00 2001 From: jinju Date: Sun, 10 Mar 2024 21:02:27 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[Fix/#126]:=20=EB=93=9C=EB=A1=A0=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20=EB=B0=8F=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../part/purchasepart/HeightCard.tsx | 9 ++++++-- .../part/purchasepart/SquareCard.tsx | 11 +++++++--- .../part/purchasepart/WidthCard.tsx | 22 +++++++++++-------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/components/part/purchasepart/HeightCard.tsx b/src/components/part/purchasepart/HeightCard.tsx index d81c2a4..e77bef6 100644 --- a/src/components/part/purchasepart/HeightCard.tsx +++ b/src/components/part/purchasepart/HeightCard.tsx @@ -30,7 +30,9 @@ const HeightCard: React.FC = ({ data }) => { style={{ width: '66px', height: '22px' }} /> - + + + = ({ data }) => { {data.store} - - {/* */} + + + {data.name} @@ -103,7 +104,11 @@ const Store = styled.div` const Image = styled.div` width: 329px; height: 187px; - /* background-color: #b1b1b1; */ + + img { + width: 329px; + height: 187px; + } `; const Content = styled.div` diff --git a/src/components/part/purchasepart/WidthCard.tsx b/src/components/part/purchasepart/WidthCard.tsx index 61d6162..b625d98 100644 --- a/src/components/part/purchasepart/WidthCard.tsx +++ b/src/components/part/purchasepart/WidthCard.tsx @@ -25,8 +25,9 @@ const WidthCard: React.FC = ({ data }) => { return ( - - {/* */} + + + @@ -128,13 +129,16 @@ const Top = styled.div` gap: 15px; `; -// const Image = styled.div` -// width: 122px; -// height: 122px; -// /* background-color: #bdbdbd; */ -// display: flex; -// flex-direction: row; -// `; +const Image = styled.div` + width: 122px; + height: 122px; + display: flex; + flex-direction: row; + &img { + width: 100%; + height: auto; + } +`; const Content = styled.div` width: 380px;