From 31288e55f67e0949fa5580e2fccc5b7f5943f1e9 Mon Sep 17 00:00:00 2001 From: Rachita Dashore <58704284+RchtDshr@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:59:20 +0530 Subject: [PATCH] changed || to && --- src/components/EventPageClient.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/EventPageClient.tsx b/src/components/EventPageClient.tsx index 425b0e9..c4c762c 100644 --- a/src/components/EventPageClient.tsx +++ b/src/components/EventPageClient.tsx @@ -60,7 +60,7 @@ const EventPageClient = ({ eventsId }: { eventsId: string }) => { const registrationStartDate = new Date(data[0].event_registration_startdate); const registrationEndDate = new Date(data[0].event_registration_enddate); - if (currentDate < registrationStartDate || currentDate > registrationEndDate) { + if (currentDate < registrationStartDate && currentDate > registrationEndDate) { setRegistrationClosed(true); // Set registration closed if outside the valid period } };