Skip to content

Commit

Permalink
Merge pull request #43 from pesto-students/development
Browse files Browse the repository at this point in the history
issue fixing
  • Loading branch information
tejas96 authored Dec 12, 2021
2 parents 6e0bcd3 + cbf7e62 commit 5858419
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/components/Cart/styledComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const Item = styled.div`
padding-top: 12px;
padding-bottom: 12px;
flex-direction: column;
@media (min-width: 992px) {
flex-direction: row;
}
Expand Down Expand Up @@ -108,6 +109,7 @@ const ItemImage = styled.div`
width: 100%;
height: 100%;
object-fit: contain;
cursor: pointer;
}
`;

Expand Down
11 changes: 11 additions & 0 deletions src/components/ProductListingPage/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const ShoppingCard = ({
text={'Add to cart'}
/>
</div>
<div className="card-tag">{item.condition}</div>
</CardImgContainer>
<CardBody>
<h6 className="card-body-title">{title}</h6>
Expand Down Expand Up @@ -97,6 +98,16 @@ export const CardImgContainer = styled.div`
border-radius: 0;
}
}
.card-tag {
position: absolute;
top: 0;
left: 0;
background-color: ${(props) => props.theme.colors.primary};
padding: 5px 10px;
border-radius: ${(props) => props.theme.size.xsm};
font-weight: bold;
color: #fff;
}
&:hover .img-overlay {
display: flex;
height: 50px;
Expand Down
1 change: 0 additions & 1 deletion src/components/ProductListingPage/SideBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ function SideBar() {
format: __getFilterValue(filterState.format)
};
const query = genrateQueryString(payload);
console.log(payload);
history.push({
pathname: PRODUCT_LISTING,
search: `${query ? '?' + query : ''}`,
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProductListingPage/styledComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Sidebar = styled.div`
margin: 10px;
background-color: black;
&:hover {
background-color: black;
background-color: ${(props) => props.theme.colors.primaryLight};
color: white;
}
}
Expand Down
10 changes: 9 additions & 1 deletion src/components/common/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ const Header = ({
<HeaderContainer>
<HeaderLeftContainer>
<Link to={HOME} className="link">
<BrandName>The</BrandName>
<BrandName>
The
<FeatherIcon
className="brand-name-icon"
onClick={() => setHamburgClicked(true)}
icon="book-open"
size="30"
/>
</BrandName>
<BrandName>Booktown</BrandName>
</Link>
{!isSearchBarHide && (
Expand Down
5 changes: 4 additions & 1 deletion src/components/common/header/styledComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const MenuContainer = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
width: 30%;
width: 40%;
& {
@media (max-width: ${(props) => props.theme.breakpoints.tablet}) {
Expand Down Expand Up @@ -46,6 +46,9 @@ export const HeaderContainer = styled.div`
opacity: 1;
}
}
.brand-name-icon {
margin-left: 10px;
}
& {
@media (max-width: ${(props) => props.theme.breakpoints.tablet}) {
${MenuContainer} {
Expand Down
12 changes: 3 additions & 9 deletions src/components/common/search/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { LoaderIcon } from 'react-hot-toast';
import {
SearchContainer,
SearchInput,
SearchItem,
SearchResultsContainer,
SearchInput
SearchResultsContainer
} from './styledComponents';
function SearchBar({
onChange = () => {},
Expand All @@ -26,12 +25,7 @@ function SearchBar({
</SearchContainer>
<SearchResultsContainer>
{searchLoader ? (
<div className="search-loader">
<LoaderIcon
style={{ height: '30px', width: '30px', padding: '10px' }}
/>{' '}
Loading...
</div>
<div className="search-loader">Loading...</div>
) : (
searchData.map((item, index) => (
<SearchItem key={item.id} onClick={() => onSearchItemSelect(item)}>
Expand Down

0 comments on commit 5858419

Please sign in to comment.