Skip to content

Commit

Permalink
fix: remove monitoring params logic from navbar (#2975)
Browse files Browse the repository at this point in the history
Co-authored-by: Omri Levy <[email protected]>
  • Loading branch information
r4zendev and Omri-Levy authored Jan 20, 2025
1 parent bc8c22b commit 787713a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useFilterId } from '@/common/hooks/useFilterId/useFilterId';
import { useLocale } from '@/common/hooks/useLocale/useLocale';
import { useCustomerQuery } from '@/domains/customer/hooks/queries/useCustomerQuery/useCustomerQuery';
import { useFiltersQuery } from '@/domains/filters/hooks/queries/useFiltersQuery/useFiltersQuery';
import { MERCHANT_MONITORING_QUERY_PARAMS_KEY } from '@/pages/MerchantMonitoring/constants';
import { TRoutes, TRouteWithChildren } from '@/Router/types';

export const useNavbarLogic = () => {
Expand All @@ -22,7 +21,6 @@ export const useNavbarLogic = () => {
[filters],
);
const { data: customer } = useCustomerQuery();
const merchantMonitoringParams = sessionStorage.getItem(MERCHANT_MONITORING_QUERY_PARAMS_KEY);

const navItems = [
{
Expand All @@ -36,7 +34,7 @@ export const useNavbarLogic = () => {
{
text: 'Merchant Monitoring',
icon: <MonitorDot size={20} />,
href: `/en/merchant-monitoring${merchantMonitoringParams ?? ''}`,
href: `/en/merchant-monitoring`,
key: 'nav-item-merchant-monitoring',
},
]
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import {
RISK_LEVEL_FILTER,
STATUS_LEVEL_FILTER,
} from '@/pages/MerchantMonitoring/schemas';
import { useLocation } from 'react-router-dom';
import { MERCHANT_MONITORING_QUERY_PARAMS_KEY } from '@/pages/MerchantMonitoring/constants';

const useDefaultDateRange = () => {
const [{ from, to }, setSearchParams] = useZodSearchParams(MerchantMonitoringSearchSchema);
Expand Down Expand Up @@ -61,11 +59,6 @@ export const useMerchantMonitoringLogic = () => {
setSearchParams,
] = useZodSearchParams(MerchantMonitoringSearchSchema, { replace: true });

const { search: searchString } = useLocation();
useEffect(() => {
sessionStorage.setItem(MERCHANT_MONITORING_QUERY_PARAMS_KEY, searchString);
}, [searchString]);

const { findings: findingsOptions, isLoading: isLoadingFindings } = useFindings();

const { data, isLoading: isLoadingBusinessReports } = useBusinessReportsQuery({
Expand Down

0 comments on commit 787713a

Please sign in to comment.