| @@ -14,8 +14,8 @@ import { | |||
| BlockIcon, | |||
| ButtonsContainer, | |||
| BlockLabelIcon, | |||
| MessageButton, | |||
| MessageIcon, | |||
| // MessageButton, | |||
| // MessageIcon, | |||
| ProfileInfoAndContactContainer, | |||
| } from "./ProfileCard.styled"; | |||
| import PersonOutlineIcon from "@mui/icons-material/PersonOutline"; | |||
| @@ -142,18 +142,15 @@ const ProfileCard = (props) => { | |||
| </RemoveButton> | |||
| </> | |||
| )} | |||
| {isMyProfile || props.isAdmin ? ( | |||
| <EditButton | |||
| onClick={() => setEditProfileModal(true)} | |||
| isAdmin={props.isAdmin} | |||
| > | |||
| <EditIcon /> | |||
| </EditButton> | |||
| ) : ( | |||
| <MessageButton> | |||
| <MessageIcon /> | |||
| </MessageButton> | |||
| )} | |||
| {isMyProfile || | |||
| (props.isAdmin && ( | |||
| <EditButton | |||
| onClick={() => setEditProfileModal(true)} | |||
| isAdmin={props.isAdmin} | |||
| > | |||
| <EditIcon /> | |||
| </EditButton> | |||
| ))} | |||
| </ButtonsContainer> | |||
| <ProfileInfoContainer> | |||
| <ProfileInfoAndContactContainer> | |||
| @@ -7,7 +7,7 @@ import Offers from "./Offers/Offers"; | |||
| const MarketPlace = (props) => { | |||
| const [isGrid, setIsGrid] = useState(false); | |||
| const offers = props.offers; | |||
| console.log("MARKETPLACE") | |||
| console.log("MARKETPLACE"); | |||
| return ( | |||
| <MarketPlaceContainer> | |||
| <Header | |||
| @@ -1,35 +1,36 @@ | |||
| import { Box, Typography } from "@mui/material"; | |||
| import styled from "styled-components"; | |||
| import {ReactComponent as HalfLogo} from "../../../../assets/images/svg/half-logo.svg" | |||
| import { ReactComponent as HalfLogo } from "../../../../assets/images/svg/half-logo.svg"; | |||
| import selectedTheme from "../../../../themes"; | |||
| export const NoProfileOffersContainer = styled(Box)` | |||
| text-align: center; | |||
| background-color: white; | |||
| height: 340px; | |||
| display: flex; | |||
| flex-direction: column; | |||
| border-radius: 4px; | |||
| ` | |||
| text-align: center; | |||
| background-color: white; | |||
| height: 340px; | |||
| width: 100%; | |||
| display: flex; | |||
| flex-direction: column; | |||
| border-radius: 4px; | |||
| `; | |||
| export const NoProfileOffersIcon = styled(HalfLogo)` | |||
| margin-top: 85px; | |||
| text-align: center; | |||
| width: 100%; | |||
| ` | |||
| margin-top: 85px; | |||
| text-align: center; | |||
| width: 100%; | |||
| `; | |||
| export const NoProfileOffersMainText = styled(Typography)` | |||
| font-family: ${selectedTheme.fonts.textFont}; | |||
| font-weight: 700; | |||
| font-size: 24px; | |||
| text-align: center; | |||
| color: ${selectedTheme.colors.primaryPurple}; | |||
| margin-top: 10px; | |||
| line-height: 33px; | |||
| ` | |||
| font-family: ${selectedTheme.fonts.textFont}; | |||
| font-weight: 700; | |||
| font-size: 24px; | |||
| text-align: center; | |||
| color: ${selectedTheme.colors.primaryPurple}; | |||
| margin-top: 10px; | |||
| line-height: 33px; | |||
| `; | |||
| export const NoProfileOffersAltText = styled(Typography)` | |||
| font-family: ${selectedTheme.fonts.textFont}; | |||
| font-size: 16px; | |||
| color: ${selectedTheme.colors.primaryGrayText}; | |||
| text-align: center; | |||
| margin-top: 9px; | |||
| line-height: 22px; | |||
| ` | |||
| font-family: ${selectedTheme.fonts.textFont}; | |||
| font-size: 16px; | |||
| color: ${selectedTheme.colors.primaryGrayText}; | |||
| text-align: center; | |||
| margin-top: 9px; | |||
| line-height: 22px; | |||
| `; | |||
| @@ -106,18 +106,22 @@ const ProfileOffers = (props) => { | |||
| <NoProfileOffers /> | |||
| ) | |||
| ) : ( | |||
| <OffersScroller hideArrows> | |||
| {offersToShow.map((item) => ( | |||
| <OfferCard | |||
| isAdmin={props.isAdmin} | |||
| vertical | |||
| isMyOffer={props.isMyProfile || props.isAdmin} | |||
| offer={item} | |||
| key={JSON.stringify(item)} | |||
| pinned={item.pinned} | |||
| messageUser={messageUser} | |||
| /> | |||
| ))} | |||
| <OffersScroller hideArrows noOffers> | |||
| {offersToShow.length !== 0 ? ( | |||
| offersToShow.map((item) => ( | |||
| <OfferCard | |||
| isAdmin={props.isAdmin} | |||
| vertical | |||
| isMyOffer={props.isMyProfile || props.isAdmin} | |||
| offer={item} | |||
| key={JSON.stringify(item)} | |||
| pinned={item.pinned} | |||
| messageUser={messageUser} | |||
| /> | |||
| )) | |||
| ) : ( | |||
| <NoProfileOffers /> | |||
| )} | |||
| </OffersScroller> | |||
| )} | |||
| </OffersContainer> | |||
| @@ -14,8 +14,8 @@ export const ProfileOffersContainer = styled(Box)` | |||
| @media (max-width: 600px) { | |||
| padding: 0; | |||
| width: calc(100vw - 36px); | |||
| margin: 34px ${props => props.isAdmin ? "18px" : "0"}; | |||
| margin-bottom: ${props => !props.isAdmin && '0'} | |||
| margin: 34px ${(props) => (props.isAdmin ? "18px" : "0")}; | |||
| margin-bottom: ${(props) => !props.isAdmin && "0"}; | |||
| } | |||
| `; | |||
| export const OffersContainer = styled(Box)` | |||
| @@ -23,7 +23,7 @@ export const OffersContainer = styled(Box)` | |||
| `; | |||
| export const OffersScroller = styled(HorizontalScroller)` | |||
| height: 400px; | |||
| width: 100%; | |||
| ${(props) => props.noOffers && `width: 100%;`} | |||
| margin-left: 0; | |||
| & div { | |||
| margin-left: 0; | |||
| @@ -32,6 +32,10 @@ const ItemDetailsPage = (props) => { | |||
| } | |||
| }, [selectedOffer?.offer]); | |||
| useEffect(() => { | |||
| window.scrollTo({ top: 0, behaviour: "smooth" }); | |||
| }, []); | |||
| return ( | |||
| <ItemDetailsPageContainer> | |||
| <ItemDetailsLayout | |||