From 1e5afda77c9823ee850d2add9615905f19ecfb43 Mon Sep 17 00:00:00 2001 From: Maarten Date: Tue, 10 Sep 2024 13:48:29 +0200 Subject: [PATCH] Fix notifications max time check --- app/(settings)/notifications.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/(settings)/notifications.tsx b/app/(settings)/notifications.tsx index 4603e5a..6a11cfc 100644 --- a/app/(settings)/notifications.tsx +++ b/app/(settings)/notifications.tsx @@ -17,7 +17,7 @@ import { setSession } from '@/src/store/dataStore'; import { ThemedIcon } from '@/src/components/themed/ThemedIcon'; interface NotificationType { - key: 'dayBefore' | 'sameDay' | 'pickup'; + key: string; label: string; defaultTime: string; minTime?: string; @@ -131,8 +131,8 @@ export default function CategoryScreen() { Message.error( t( "notifications-before-16-00" ) ); return; } - } else if (notification.minTime) { - const maxDate = new Date( `1970-01-01T${notification.minTime}` ); + } else if (notification.maxTime) { + const maxDate = new Date( `1970-01-01T${notification.maxTime}` ); if (maxDate < selectedDate) { Message.error( t( "notifications-after-09-00" ) ); return;