Skip to content

Commit

Permalink
Merge pull request #144 from Weflo-A/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
yyypearl authored Mar 10, 2024
2 parents e8b993f + 9061f5b commit a90b07d
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 19 deletions.
9 changes: 8 additions & 1 deletion src/components/onboarding/droneSearch/DroneSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: '드론그룹',
}))
Expand All @@ -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
);
}
);
};
Expand Down
6 changes: 2 additions & 4 deletions src/components/onboarding/droneSearch/FilterLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,19 @@ const FilterLine: React.FC<FilterLineProps> = ({
const [selectedFilterIds, setSelectedFilterIds] = useState<string[]>([]);

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);
}
};

Expand Down
9 changes: 7 additions & 2 deletions src/components/part/purchasepart/HeightCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ const HeightCard: React.FC<ProductCardProps> = ({ data }) => {
style={{ width: '66px', height: '22px' }}
/>
</Small>
<img src={data.image} />
<Image>
<img src={data.image} />
</Image>
<Content>
<Typography
height='32px'
Expand Down Expand Up @@ -102,8 +104,11 @@ const Small = styled.div`
const Image = styled.div`
width: 232px;
height: 190px;
/* background-color: antiquewhite; */
border-radius: 8px;
img {
width: 232px;
height: 190px;
}
`;

const Content = styled.div`
Expand Down
11 changes: 8 additions & 3 deletions src/components/part/purchasepart/SquareCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ const SquareCard: React.FC<ProductCardProps> = ({ data }) => {
{data.store}
</Typography>
</Store>
<img src={data.image} />
{/* <Image></Image> */}
<Image>
<img src={data.image} />
</Image>
<Content>
<Typography fontSize='14px' fontWeight='bold' color={colors.basic700}>
{data.name}
Expand Down Expand Up @@ -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`
Expand Down
22 changes: 13 additions & 9 deletions src/components/part/purchasepart/WidthCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ const WidthCard: React.FC<ProductCardProps> = ({ data }) => {
return (
<Card>
<Top>
<img src='src/sdfs/assets/images/other1.jpeg' />
{/* <Image><img src={data.image} /></Image> */}
<Image>
<img src={data.image} />
</Image>
<Content>
<Small>
<Typography variant='caption' color={colors.basic500}>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a90b07d

Please sign in to comment.