From 877cf0f274be34d59340da832e80df5e5ba8ca23 Mon Sep 17 00:00:00 2001 From: Pavel Meyer Date: Wed, 1 Nov 2023 14:06:01 +0300 Subject: [PATCH] CW-2256 Fixed size of icon and v04 navigation --- .../InboxFilterButton/InboxFilterButton.module.scss | 9 ++------- .../InboxFilterButton/InboxFilterButton.tsx | 12 +++++++----- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/pages/inbox/components/InboxFilterButton/InboxFilterButton.module.scss b/src/pages/inbox/components/InboxFilterButton/InboxFilterButton.module.scss index 9b3daf0c31..a4e15ac9d5 100644 --- a/src/pages/inbox/components/InboxFilterButton/InboxFilterButton.module.scss +++ b/src/pages/inbox/components/InboxFilterButton/InboxFilterButton.module.scss @@ -23,12 +23,7 @@ } .icon { - width: 1rem; - height: 1rem; + width: 1.5rem; + height: 1.5rem; color: inherit; - - @include tablet { - width: 1.125rem; - height: 1.125rem; - } } \ No newline at end of file diff --git a/src/pages/inbox/components/InboxFilterButton/InboxFilterButton.tsx b/src/pages/inbox/components/InboxFilterButton/InboxFilterButton.tsx index 554714a4df..26a84f6833 100644 --- a/src/pages/inbox/components/InboxFilterButton/InboxFilterButton.tsx +++ b/src/pages/inbox/components/InboxFilterButton/InboxFilterButton.tsx @@ -1,7 +1,7 @@ import React, { FC } from "react"; -import { useHistory } from "react-router"; +import { useHistory, useLocation } from "react-router"; import classnames from "classnames"; -import { QueryParamKey, ROUTE_PATHS } from "@/shared/constants"; +import { QueryParamKey } from "@/shared/constants"; import { useQueryParams, useRemoveQueryParams } from "@/shared/hooks"; import { InboxFilterIcon } from "@/shared/icons"; import { ButtonIcon } from "@/shared/ui-kit"; @@ -14,17 +14,19 @@ interface InboxFilterButtonProps { const InboxFilterButton: FC = (props) => { const { className } = props; const history = useHistory(); + const location = useLocation(); const queryParams = useQueryParams(); const { removeQueryParams } = useRemoveQueryParams(); - const isActiveUnreadInboxItemsQueryParam = queryParams[QueryParamKey.Unread] === "true"; + const isActiveUnreadInboxItemsQueryParam = + queryParams[QueryParamKey.Unread] === "true"; const handleFilterIconClick = (): void => { if (isActiveUnreadInboxItemsQueryParam) { removeQueryParams(QueryParamKey.Unread); } else { - history.push(`${ROUTE_PATHS.INBOX}?${QueryParamKey.Unread}=true`); + history.push(`${location.pathname}?${QueryParamKey.Unread}=true`); } - } + }; return (