From 5b618ba5c3de45e642b93d9123b9f57e74c09396 Mon Sep 17 00:00:00 2001 From: Kevin Monisit Date: Fri, 25 Oct 2024 10:26:01 -0400 Subject: [PATCH] Added required opt in choice for MLH --- app/dashboard/page.tsx | 94 ++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 44 deletions(-) diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index 1c3cded..7fce41c 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -390,9 +390,8 @@ export default function Dashboard() { : 0, }); - if (data.error != ''){ - alert(data.error.message) - + if (data.error != '') { + alert(data.error.message); } setUserData(data.response); @@ -440,6 +439,46 @@ export default function Dashboard() { } else if (userData?.role['director']) { return ; } else if (userData?.role.hacker) { + if (userData?.opt_in == null) { + return ( +
+ + + + Would you like to opt-in to Major League Hacking emails? You + must choose before you can proceed. + + + + + + + +
+ ); + } return (
@@ -471,39 +510,6 @@ export default function Dashboard() { )} - {userData?.opt_in == null && ( - - - Would you like to opt-in to Major League Hacking emails - - - - - - - )} {userData?.registration_status === 'checked_in' && false && ( @@ -692,23 +698,23 @@ export default function Dashboard() { Links - - Links to various things - + Links to various things - )} + (
@@ -726,7 +732,7 @@ export default function Dashboard() {
- + )