From c9639808e13bf390bc48c24d1b05f908c05daefd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlota=20Catot=20Brag=C3=B3s?= Date: Sun, 14 Jan 2024 01:12:19 +0100 Subject: [PATCH] [ORG-131] Buttons do not appear in event when it's past (#117) * usecase updated with the new exception * exception added in view * black * test * black * add restriction in FE for the event buttons in the past --- organizator/app/(tabs)/(home)/[id].tsx | 99 ++++++++++++++------------ 1 file changed, 53 insertions(+), 46 deletions(-) diff --git a/organizator/app/(tabs)/(home)/[id].tsx b/organizator/app/(tabs)/(home)/[id].tsx index 0128db2f..a167bd15 100644 --- a/organizator/app/(tabs)/(home)/[id].tsx +++ b/organizator/app/(tabs)/(home)/[id].tsx @@ -212,6 +212,11 @@ export default function EventPage() { }); }; + const isPast = () => + events?.startDate ? events.startDate < new Date().toISOString() : true; + + console.log(isPast()); + return ( ) : ( - - {isParticipant ? ( - applied ? ( - - - - Your application is: - - - - - ) : ( -