| import { useTranslation } from "react-i18next"; | import { useTranslation } from "react-i18next"; | ||||
| import SectionImage1 from "../../assets/images/about/about-1.png"; | import SectionImage1 from "../../assets/images/about/about-1.png"; | ||||
| import SectionImage2 from "../../assets/images/about/about-2.png"; | import SectionImage2 from "../../assets/images/about/about-2.png"; | ||||
| import CheckOffersButton from "./CheckOffersButton/CheckOffersButton"; | |||||
| // import CheckOffersButton from "./CheckOffersButton/CheckOffersButton"; | |||||
| import { AboutComponentContainer } from "./AboutComponent.styled"; | import { AboutComponentContainer } from "./AboutComponent.styled"; | ||||
| import useIsMobile from "../../hooks/useIsMobile"; | |||||
| // import useIsMobile from "../../hooks/useIsMobile"; | |||||
| const AboutComponent = forwardRef((props, ref) => { | const AboutComponent = forwardRef((props, ref) => { | ||||
| const { isMobile } = useIsMobile(); | |||||
| // const { isMobile } = useIsMobile(); | |||||
| const { t } = useTranslation(); | const { t } = useTranslation(); | ||||
| return ( | return ( | ||||
| <AboutComponentContainer ref={ref}> | <AboutComponentContainer ref={ref}> | ||||
| image={SectionImage2} | image={SectionImage2} | ||||
| reverse | reverse | ||||
| /> | /> | ||||
| {!isMobile && <CheckOffersButton />} | |||||
| {/* <CheckOffersButton /> */} | |||||
| </AboutComponentContainer> | </AboutComponentContainer> | ||||
| ); | ); | ||||
| }); | }); |
| export const AboutHeaderContainer = styled(Box)` | export const AboutHeaderContainer = styled(Box)` | ||||
| margin: 72px; | margin: 72px; | ||||
| @media (max-width: 1430px) { | |||||
| margin: 45px; | |||||
| } | |||||
| @media (max-width: 1200px) { | @media (max-width: 1200px) { | ||||
| margin: 36px; | margin: 36px; | ||||
| } | } |
| flex-direction: ${(props) => (props.reverse ? "row-reverse" : "row")}; | flex-direction: ${(props) => (props.reverse ? "row-reverse" : "row")}; | ||||
| gap: 144px; | gap: 144px; | ||||
| margin-bottom: 72px; | margin-bottom: 72px; | ||||
| ${(props) => props.reverse && `text-align: right;`} | |||||
| @media (max-width: 1430px) { | |||||
| ${(props) => | |||||
| props.reverse | |||||
| ? ` | |||||
| margin-right: 45px | |||||
| ` | |||||
| : `margin-left: 45px`}; | |||||
| } | |||||
| @media (max-width: 1069px) { | @media (max-width: 1069px) { | ||||
| flex-direction: column; | flex-direction: column; | ||||
| margin-bottom: 41px; | |||||
| } | } | ||||
| @media (max-width: 1200px) { | @media (max-width: 1200px) { | ||||
| } | } | ||||
| @media (max-width: 1319px) { | @media (max-width: 1319px) { | ||||
| gap: 54px; | |||||
| gap: 40px; | |||||
| } | } | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| line-height: 22px; | line-height: 22px; | ||||
| color: ${selectedTheme.colors.primaryGrayText}; | color: ${selectedTheme.colors.primaryGrayText}; | ||||
| @media (max-width: 1069px) { | |||||
| ${(props) => props.reverse && `margin-left: 36px;`} | |||||
| @media (min-width: 1069px) and (max-width: 1230px) { | |||||
| ${(props) => props.reverse && `padding-bottom: 50px;`} | |||||
| } | } | ||||
| @media (max-width: 1160px) { | |||||
| ${(props) => props.reverse && `padding-bottom: 20px;`} | |||||
| @media (max-width: 1069px) { | |||||
| ${(props) => props.reverse && `margin-left: 36px;`} | |||||
| } | } | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| object-fit: cover; | object-fit: cover; | ||||
| @media (max-width: 1069px) { | @media (max-width: 1069px) { | ||||
| width: 100%; | |||||
| ${(props) => props.reverse && `padding-bottom: 36px`} | |||||
| width: 80%; | |||||
| ${(props) => !props.reverse && `align-self: end;`} | |||||
| } | } | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { |
| background-color: ${selectedTheme.colors.primaryPurple} !important; | background-color: ${selectedTheme.colors.primaryPurple} !important; | ||||
| } | } | ||||
| @media (max-width: 1160px) { | |||||
| bottom: -16px; | |||||
| @media (max-width: 1430px) { | |||||
| right: 22px; | |||||
| } | |||||
| @media (max-width: 1230px) { | |||||
| bottom: 0; | |||||
| } | } | ||||
| @media (max-width: 1200px) { | @media (max-width: 1200px) { | ||||
| right: 16px; | |||||
| bottom: 0; | |||||
| right: 18px; | |||||
| } | |||||
| @media (max-width: 1069px) { | |||||
| position: relative; | |||||
| right: 0; | |||||
| align-self: flex-end; | |||||
| } | } | ||||
| @media (max-width: 600px) { | @media (max-width: 600px) { |
| position: relative; | position: relative; | ||||
| top: 61px; | top: 61px; | ||||
| @media (max-width: 1194px) { | |||||
| text-align: left; | |||||
| } | |||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| font-size: 14px; | font-size: 14px; | ||||
| top: 30px; | top: 30px; | ||||
| position: relative; | position: relative; | ||||
| top: 8px; | top: 8px; | ||||
| @media (max-width: 600px) { | |||||
| @media (max-width: 700px) { | |||||
| display: none; | display: none; | ||||
| } | } | ||||
| `; | `; | ||||
| export const Arrow = styled(ArrowButton)` | export const Arrow = styled(ArrowButton)` | ||||
| transform: rotate(-90deg); | |||||
| transform: rotate(-45deg); | |||||
| `; | `; |
| flex-direction: row; | flex-direction: row; | ||||
| justify-content: center; | justify-content: center; | ||||
| gap: 36px; | gap: 36px; | ||||
| @media (min-width: 900px) and (max-width: 1200px) { | |||||
| margin-right: -250px; | |||||
| } | |||||
| `; | `; | ||||
| export const LinkRoute = styled(Link)` | export const LinkRoute = styled(Link)` | ||||
| text-decoration: none; | text-decoration: none; |
| HeaderContainer, | HeaderContainer, | ||||
| LogoContainer, | LogoContainer, | ||||
| MarketplaceLinkRoute, | MarketplaceLinkRoute, | ||||
| MarketplaceLinkRouteContainer, | |||||
| ToolsButtonsContainer, | ToolsButtonsContainer, | ||||
| ToolsContainer, | ToolsContainer, | ||||
| } from "./Header.styled"; | } from "./Header.styled"; | ||||
| import RegisterButton from "./RegisterButton/RegisterButton"; | import RegisterButton from "./RegisterButton/RegisterButton"; | ||||
| import useIsMobile from "../../hooks/useIsMobile"; | import useIsMobile from "../../hooks/useIsMobile"; | ||||
| import { toggleCreateOfferModal } from "../../store/actions/modal/modalActions"; | import { toggleCreateOfferModal } from "../../store/actions/modal/modalActions"; | ||||
| import { ReactComponent as Marketplace } from "../../assets/images/svg/package.svg"; | |||||
| import { useTranslation } from "react-i18next"; | |||||
| const Header = () => { | const Header = () => { | ||||
| const theme = useTheme(); | const theme = useTheme(); | ||||
| const [shouldShow, setShouldShow] = useState(true); | const [shouldShow, setShouldShow] = useState(true); | ||||
| const routeMatch = useRouteMatch(); | const routeMatch = useRouteMatch(); | ||||
| const { isMobile } = useIsMobile(); | const { isMobile } = useIsMobile(); | ||||
| const { t } = useTranslation(); | |||||
| // Dont show header on auth routes(login, register, etc.) and admin routes | // Dont show header on auth routes(login, register, etc.) and admin routes | ||||
| useEffect(() => { | useEffect(() => { | ||||
| ) : ( | ) : ( | ||||
| <React.Fragment> | <React.Fragment> | ||||
| {routeMatches(ABOUT_PAGE) ? ( | {routeMatches(ABOUT_PAGE) ? ( | ||||
| <> | |||||
| <MarketplaceLinkRoute>Marketplace</MarketplaceLinkRoute> | |||||
| </> | |||||
| <MarketplaceLinkRouteContainer> | |||||
| <MarketplaceLinkRoute onClick={() => handleLogoClick()}> | |||||
| {t("admin.navigation.marketplace")} | |||||
| </MarketplaceLinkRoute> | |||||
| <Marketplace /> | |||||
| </MarketplaceLinkRouteContainer> | |||||
| ) : ( | ) : ( | ||||
| <> | <> | ||||
| <LoginButton /> | <LoginButton /> |
| `; | `; | ||||
| export const HeaderContainer = styled(Box)``; | export const HeaderContainer = styled(Box)``; | ||||
| export const MarketplaceLinkRouteContainer = styled(Box)` | |||||
| display: flex; | |||||
| @media (max-width: 1200px) { | |||||
| position: relative; | |||||
| right: -200px; | |||||
| } | |||||
| `; | |||||
| export const MarketplaceLinkRoute = styled(Link)` | export const MarketplaceLinkRoute = styled(Link)` | ||||
| text-decoration: none; | text-decoration: none; | ||||
| font-family: ${selectedTheme.fonts.textFont}; | font-family: ${selectedTheme.fonts.textFont}; | ||||
| font-size: 16px; | font-size: 16px; | ||||
| line-height: 22px; | line-height: 22px; | ||||
| margin-right: 10px; | |||||
| letter-spacing: 0.02em; | letter-spacing: 0.02em; | ||||
| margin-left: 70px; | |||||
| border-bottom: 1px dashed ${selectedTheme.colors.primaryPurple}; | border-bottom: 1px dashed ${selectedTheme.colors.primaryPurple}; | ||||
| &:hover { | &:hover { | ||||
| border-bottom: 1px solid ${selectedTheme.colors.iconYellowColor}; | border-bottom: 1px solid ${selectedTheme.colors.iconYellowColor}; |
| ${(props) => | ${(props) => | ||||
| props.highlighted && `box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.12);`} | props.highlighted && `box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.12);`} | ||||
| @media (min-width: 1194px) and (max-width: 1430px) { | |||||
| width: 346px; | |||||
| height: 100%; | |||||
| min-width: 346px; | |||||
| } | |||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| min-width: 303px; | |||||
| width: 100%; | |||||
| width: 267px; | |||||
| height: fit-content; | |||||
| padding: 36px 18px; | |||||
| margin-top: 0; | |||||
| } | |||||
| @media (max-width: 428px) { | |||||
| min-width: 100%; | |||||
| height: fit-content; | height: fit-content; | ||||
| padding: 36px 18px; | padding: 36px 18px; | ||||
| margin-top: 0; | margin-top: 0; | ||||
| props.highlighted | props.highlighted | ||||
| ? selectedTheme.colors.primaryYellow | ? selectedTheme.colors.primaryYellow | ||||
| : selectedTheme.colors.primaryPurple}; | : selectedTheme.colors.primaryPurple}; | ||||
| @media (min-width: 1194px) and (max-width: 1430px) { | |||||
| margin-top: 42px; | |||||
| } | |||||
| `; | `; | ||||
| export const PlanTitleDescription = styled(Typography)` | export const PlanTitleDescription = styled(Typography)` | ||||
| font-family: ${selectedTheme.fonts.textFont}; | font-family: ${selectedTheme.fonts.textFont}; | ||||
| color: ${(props) => | color: ${(props) => | ||||
| props.highlighted ? "white" : selectedTheme.colors.primaryPurple}; | props.highlighted ? "white" : selectedTheme.colors.primaryPurple}; | ||||
| @media (max-width: 1430px) { | |||||
| font-size: 22px; | |||||
| } | |||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| font-size: 18px; | font-size: 18px; | ||||
| } | } | ||||
| ? selectedTheme.colors.primaryYellow | ? selectedTheme.colors.primaryYellow | ||||
| : selectedTheme.colors.primaryPurple}; | : selectedTheme.colors.primaryPurple}; | ||||
| @media (max-width: 1430px) { | |||||
| max-width: 34px; | |||||
| max-height: 20px; | |||||
| white-space: nowrap; | |||||
| overflow: hidden; | |||||
| } | |||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| font-size: 14px; | font-size: 14px; | ||||
| max-width: 30px; | |||||
| max-height: 20px; | |||||
| white-space: nowrap; | |||||
| overflow: hidden; | |||||
| } | } | ||||
| `; | `; | ||||
| export const PlanDetailDescription = styled(Typography)` | export const PlanDetailDescription = styled(Typography)` | ||||
| } | } | ||||
| } | } | ||||
| @media (min-width: 1194px) and (max-width: 1430px) { | |||||
| left: calc(50% - 12px); | |||||
| } | |||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| svg { | svg { | ||||
| width: 18px; | width: 18px; |
| padding: 72px; | padding: 72px; | ||||
| background: white; | background: white; | ||||
| @media (max-width: 1430px) { | |||||
| padding: 51px; | |||||
| } | |||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| padding: 36px; | padding: 36px; | ||||
| } | } | ||||
| margin-top: 46px; | margin-top: 46px; | ||||
| margin-bottom: 36px; | margin-bottom: 36px; | ||||
| @media (max-width: 1430px) { | |||||
| gap: 27px; | |||||
| } | |||||
| @media (max-width: 1193px) { | |||||
| flex-direction: column; | |||||
| align-items: center; | |||||
| } | |||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| flex-direction: column; | flex-direction: column; | ||||
| gap: 27px; | gap: 27px; |
| export const PrivacyPolicyContainer = styled(Box)` | export const PrivacyPolicyContainer = styled(Box)` | ||||
| margin: 72px; | margin: 72px; | ||||
| @media (max-width: 834px) { | |||||
| margin: 45px; | |||||
| } | |||||
| @media (max-width: 600px) { | @media (max-width: 600px) { | ||||
| margin: 36px 36px 69px 36px; | margin: 36px 36px 69px 36px; | ||||
| } | } |