From 4a32088c3bca009066b8ac8e3990d78179df06ca Mon Sep 17 00:00:00 2001 From: Birk Johansson Date: Mon, 21 Oct 2024 16:53:43 +0200 Subject: [PATCH] fix: minor linting --- src/components/form/DefaultFormContents.tsx | 1 - src/lib/routeUtils/useLocationSearchState.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/components/form/DefaultFormContents.tsx b/src/components/form/DefaultFormContents.tsx index 54a81abe..789679be 100644 --- a/src/components/form/DefaultFormContents.tsx +++ b/src/components/form/DefaultFormContents.tsx @@ -2,7 +2,6 @@ import i18n from '@dhis2/d2-i18n' import { Card } from '@dhis2/ui' import React from 'react' import { useFormState } from 'react-final-form' -import { useNavigate } from 'react-router-dom' import { getSectionPath, useNavigateWithSearchState } from '../../lib' import { ModelSection } from '../../types' import { StandardFormActions, StandardFormSection } from '../standardForm' diff --git a/src/lib/routeUtils/useLocationSearchState.ts b/src/lib/routeUtils/useLocationSearchState.ts index df68db91..113c0f7f 100644 --- a/src/lib/routeUtils/useLocationSearchState.ts +++ b/src/lib/routeUtils/useLocationSearchState.ts @@ -1,4 +1,3 @@ -import { useTo } from './useLocationSearchState' import { useCallback, useMemo } from 'react' import { Location, @@ -76,7 +75,6 @@ export const useNavigateWithSearchState = () => { Use this to re-apply the saved-search-state when navigating between pages. */ export const useToWithSearchState = (to: To) => { const location = useLocationWithSearchState() - return useMemo(() => { return applySearchState(to, location.state) }, [to, location.state])