| @@ -47,7 +47,9 @@ const OfferCard = (props) => { | |||
| const { isMobile } = useIsMobile(); | |||
| const routeToItem = (itemId) => { | |||
| history.push(`/proizvodi/${itemId}`); | |||
| if (!props.disabledCheckButton) { | |||
| history.push(`/proizvodi/${itemId}`); | |||
| } | |||
| }; | |||
| const messageUser = () => { | |||
| props.messageUser(props.offer); | |||
| @@ -89,8 +91,9 @@ const OfferCard = (props) => { | |||
| : props?.offer?.pinned?.toString() | |||
| } | |||
| halfwidth={props.halfwidth ? 1 : 0} | |||
| onClick={() => routeToItem(props?.offer?._id)} | |||
| > | |||
| {/* This only shows on vertical offer card */} | |||
| {/* This only shows on vertical offer card */} | |||
| <OfferTitleAboveImage | |||
| vertical={props.vertical} | |||
| onClick={() => routeToItem(props?.offer?._id)} | |||
| @@ -98,7 +101,7 @@ const OfferCard = (props) => { | |||
| {props?.offer?.name} | |||
| </OfferTitleAboveImage> | |||
| {/* ^^^^^^^ */} | |||
| <OfferFlexContainer vertical={props.vertical}> | |||
| <OfferImageContainer vertical={props.vertical}> | |||
| <OfferImage | |||
| @@ -153,6 +156,7 @@ const OfferCard = (props) => { | |||
| <Line /> | |||
| <OfferDescription description={props?.offer?.description} /> | |||
| <CheckButton | |||
| disabled={props.disabledCheckButton} | |||
| offerId={props?.offer?._id} | |||
| sponsored={props.sponsored} | |||
| /> | |||
| @@ -236,6 +240,7 @@ OfferCard.propTypes = { | |||
| makeReview: PropTypes.func, | |||
| dontShowViews: PropTypes.bool, | |||
| skeleton: PropTypes.bool, | |||
| disabledCheckButton: PropTypes.bool, | |||
| }; | |||
| OfferCard.defaultProps = { | |||
| halfwidth: false, | |||
| @@ -10,7 +10,6 @@ import { ReactComponent as Like } from "../../../assets/images/svg/like.svg"; | |||
| import { ReactComponent as Pin } from "../../../assets/images/svg/pin.svg"; | |||
| import { ReactComponent as Category } from "../../../assets/images/svg/category.svg"; | |||
| export const OfferCardContainer = styled(Container)` | |||
| display: ${(props) => (props.skeleton ? "none" : "flex")}; | |||
| flex-direction: column; | |||
| @@ -29,6 +28,7 @@ export const OfferCardContainer = styled(Container)` | |||
| max-width: 2000px; | |||
| height: 180px; | |||
| position: relative; | |||
| cursor: pointer; | |||
| @media (max-width: 550px) { | |||
| height: 194px; | |||
| padding: 18px; | |||
| @@ -363,7 +363,7 @@ export const PinIcon = styled(Pin)` | |||
| `; | |||
| export const CategoryIcon = styled(Category)` | |||
| width: 14px; | |||
| & path { | |||
| stroke-width: 1; | |||
| } | |||
| ` | |||
| & path { | |||
| stroke-width: 1; | |||
| } | |||
| `; | |||
| @@ -1,7 +1,6 @@ | |||
| import { Box } from "@mui/material"; | |||
| import styled from "styled-components"; | |||
| export const DrawerContainer = styled(Box)` | |||
| display: flex; | |||
| flex-direction: column; | |||
| @@ -18,6 +17,9 @@ export const LogoContainer = styled(Box)` | |||
| justify-content: center; | |||
| align-items: center; | |||
| cursor: pointer; | |||
| svg { | |||
| width: 90%; | |||
| } | |||
| @media (min-width: 800px) { | |||
| position: relative; | |||
| left: 15px; | |||
| @@ -31,4 +31,5 @@ export const OffersNotFoundDescription = styled(Typography)` | |||
| export const Button = styled(PrimaryButton)` | |||
| font-weight: 600; | |||
| letter-spacing: 1.5px; | |||
| min-width: max-content; | |||
| `; | |||
| @@ -7,6 +7,9 @@ import { Icon } from "../../../Icon/Icon"; | |||
| export const SearchInput = styled(TextField)` | |||
| position: relative; | |||
| top: 15px; | |||
| & div { | |||
| background-color: white; | |||
| } | |||
| & div fieldset { | |||
| border-color: ${selectedTheme.colors.primaryPurple} !important; | |||
| } | |||