Skip to content

Commit

Permalink
CW-2256 Fixed size of icon and v04 navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
pvm-code committed Nov 1, 2023
1 parent 330d1f4 commit 877cf0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -14,17 +14,19 @@ interface InboxFilterButtonProps {
const InboxFilterButton: FC<InboxFilterButtonProps> = (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 (
<ButtonIcon
Expand Down

0 comments on commit 877cf0f

Please sign in to comment.