From 251a73e3e03c44b968ef8a475a72ff7e77fa2846 Mon Sep 17 00:00:00 2001 From: Claire Dagan Date: Mon, 24 Jun 2024 12:26:43 +0200 Subject: [PATCH] [Tech] changes after code review --- .../Reportings/hooks/useGetFilteredReportingsQuery.ts | 2 +- .../features/layersSelector/search/ResultsList/index.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/features/Reportings/hooks/useGetFilteredReportingsQuery.ts b/frontend/src/features/Reportings/hooks/useGetFilteredReportingsQuery.ts index bf4492bd6..c86cbc746 100644 --- a/frontend/src/features/Reportings/hooks/useGetFilteredReportingsQuery.ts +++ b/frontend/src/features/Reportings/hooks/useGetFilteredReportingsQuery.ts @@ -56,7 +56,7 @@ export const useGetFilteredReportingsQuery = () => { switch (periodFilter) { case ReportingDateRangeEnum.DAY: // to prevent refeteching every second we don't send seconds in query - startedAfterDate = `${customDayjs().utc().subtract(24, 'hour').toISOString().substring(0, 16)}:00.000Z` + startedAfterDate = `${customDayjs().utc().subtract(24, 'hour').format('YYYY-MM-DDTHH:mm')}:00.000Z` break diff --git a/frontend/src/features/layersSelector/search/ResultsList/index.tsx b/frontend/src/features/layersSelector/search/ResultsList/index.tsx index dac0e627c..765035524 100644 --- a/frontend/src/features/layersSelector/search/ResultsList/index.tsx +++ b/frontend/src/features/layersSelector/search/ResultsList/index.tsx @@ -50,20 +50,20 @@ export function ResultList({ searchedText }: ResultListProps) { dispatch(layerSidebarActions.toggleAmpResults()) } - const toggleAMPVisibility = isChecked => { + const toggleAMPVisibility = (isChecked: boolean | undefined) => { if (!isChecked) { dispatch(layerSidebarActions.toggleAmpResults(false)) } dispatch(closeMetadataPanel()) - dispatch(setIsAmpSearchResultsVisible(isChecked)) + dispatch(setIsAmpSearchResultsVisible(!!isChecked)) } - const toggleRegulatoryVisibility = isChecked => { + const toggleRegulatoryVisibility = (isChecked: boolean | undefined) => { if (!isChecked) { dispatch(layerSidebarActions.toggleRegulatoryResults(false)) } dispatch(closeMetadataPanel()) - dispatch(setIsRegulatorySearchResultsVisible(isChecked)) + dispatch(setIsRegulatorySearchResultsVisible(!!isChecked)) } return (