|
|
|
@@ -1,6 +1,7 @@ |
|
|
|
import React, { useMemo } from "react"; |
|
|
|
import PropTypes from "prop-types"; |
|
|
|
import { |
|
|
|
ButtonContainer, |
|
|
|
// ButtonContainer, |
|
|
|
CategoryHeaderIcon, |
|
|
|
HeaderAltLocation, |
|
|
|
@@ -14,6 +15,7 @@ import { |
|
|
|
HeaderOptions, |
|
|
|
HeaderSelect, |
|
|
|
HeaderSubcategoryString, |
|
|
|
HeaderText, |
|
|
|
// HeaderText, |
|
|
|
HeaderTitleContainer, |
|
|
|
HeaderTitleText, |
|
|
|
@@ -37,8 +39,9 @@ import SkeletonHeader from "./SkeletonHeader/SkeletonHeader"; |
|
|
|
import { useSelector } from "react-redux"; |
|
|
|
import { selectHeaderString } from "../../../store/selectors/filtersSelectors"; |
|
|
|
import useIsMobile from "../../../hooks/useIsMobile"; |
|
|
|
import { ArrowButton } from "../../Buttons/ArrowButton/ArrowButton"; |
|
|
|
// import { ArrowButton } from "../../Buttons/ArrowButton/ArrowButton"; |
|
|
|
// import history from "../../../store/utils/history"; |
|
|
|
import history from "../../../store/utils/history"; |
|
|
|
|
|
|
|
const DownArrow = (props) => ( |
|
|
|
<IconStyled {...props}> |
|
|
|
@@ -75,6 +78,9 @@ const Header = (props) => { |
|
|
|
props.offers.filters.locations.clear(); |
|
|
|
props.offers.applyFilters(); |
|
|
|
}; |
|
|
|
const goBack = () => { |
|
|
|
history.goBack(); |
|
|
|
}; |
|
|
|
|
|
|
|
return ( |
|
|
|
<> |
|
|
|
@@ -89,27 +95,44 @@ const Header = (props) => { |
|
|
|
<CategoryHeaderIcon /> |
|
|
|
<HeaderLocation> |
|
|
|
{/* {headerString} */} |
|
|
|
<HeaderCategoryString component="span" onClick={handleClickCategory}> |
|
|
|
<HeaderCategoryString |
|
|
|
component="span" |
|
|
|
onClick={handleClickCategory} |
|
|
|
> |
|
|
|
{headerString.categoryString} |
|
|
|
{headerString.subcategoryString && <> </>} |
|
|
|
{/* {headerString.subcategoryString && <> </>} */} |
|
|
|
</HeaderCategoryString> |
|
|
|
<HeaderSubcategoryString component="span" onClick={handleClickSubcategory}> |
|
|
|
<HeaderSubcategoryString |
|
|
|
component="span" |
|
|
|
onClick={handleClickSubcategory} |
|
|
|
> |
|
|
|
{headerString.subcategoryString} |
|
|
|
{headerString.locationsString && <> </>} |
|
|
|
{/* {headerString.locationsString && <> </>} */} |
|
|
|
</HeaderSubcategoryString> |
|
|
|
<HeaderLocationsString component="span"> |
|
|
|
<HeaderLocationsMainString component="span"> |
|
|
|
{headerString.locationsString} |
|
|
|
</HeaderLocationsMainString> |
|
|
|
<HeaderAltLocation component="span">{altString}</HeaderAltLocation> |
|
|
|
<HeaderAltLocation component="span"> |
|
|
|
{altString} |
|
|
|
</HeaderAltLocation> |
|
|
|
</HeaderLocationsString> |
|
|
|
</HeaderLocation> |
|
|
|
</> |
|
|
|
) : ( |
|
|
|
<HeaderTitleContainer> |
|
|
|
<SwapsHeaderIcon /> |
|
|
|
<HeaderTitleText>{t("header.myOffers")}</HeaderTitleText> |
|
|
|
</HeaderTitleContainer> |
|
|
|
<> |
|
|
|
{!isMobile ? ( |
|
|
|
<HeaderTitleContainer> |
|
|
|
<SwapsHeaderIcon /> |
|
|
|
<HeaderTitleText>{t("header.myOffers")}</HeaderTitleText> |
|
|
|
</HeaderTitleContainer> |
|
|
|
) : ( |
|
|
|
<ButtonContainer onClick={goBack}> |
|
|
|
<ArrowButton side={"left"}></ArrowButton> |
|
|
|
<HeaderText>{t("messages.goBack")}</HeaderText> |
|
|
|
</ButtonContainer> |
|
|
|
)} |
|
|
|
</> |
|
|
|
)} |
|
|
|
</TooltipInnerContainer> |
|
|
|
</Tooltip> |