From 4a244dffe2d0a464037b061a2c1fa4f8e94264d0 Mon Sep 17 00:00:00 2001 From: thoreyjona Date: Thu, 10 Oct 2024 15:29:54 +0000 Subject: [PATCH] feat: use now both for dateTo and dateFrom --- apps/native/app/src/screens/health/health-overview.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/native/app/src/screens/health/health-overview.tsx b/apps/native/app/src/screens/health/health-overview.tsx index fdb5dda13d421..90e4e2cc4b729 100644 --- a/apps/native/app/src/screens/health/health-overview.tsx +++ b/apps/native/app/src/screens/health/health-overview.tsx @@ -55,11 +55,6 @@ export const HealthOverviewScreen: NavigationFunctionComponent = ({ const [refetching, setRefetching] = useState(false) const now = useMemo(() => new Date().toISOString(), []) - const dayOfYesterday = useMemo(() => new Date().getDate() - 1, []) - const yesterday = useMemo( - () => new Date(new Date().setDate(dayOfYesterday)).toISOString(), - [dayOfYesterday], - ) const healthInsuranceRes = useGetHealthInsuranceOverviewQuery() const healthCenterRes = useGetHealthCenterQuery() @@ -67,7 +62,9 @@ export const HealthOverviewScreen: NavigationFunctionComponent = ({ const paymentOverviewRes = useGetPaymentOverviewQuery({ variables: { input: { - dateFrom: yesterday, + // The items we are fethcing are static and are not using the dates for calculation, + // it is though not allowed to skip them or send and empty string so we send current date for both + dateFrom: now, dateTo: now, serviceTypeCode: '', },