From 5bb706ba8601d308f032ddceb17e0fdd07f54f1f Mon Sep 17 00:00:00 2001 From: KK Surendran <137263515+KKSurendran06@users.noreply.github.com> Date: Wed, 17 Jan 2024 09:51:00 +0530 Subject: [PATCH] Remove nominations page (#56) Remove nominations page from header; add conditional rendering to nominations page for when voting is closed; add title to nominations page Commits: * Remove nominations page * Apply suggestions from code review Co-authored-by: Nicholas Langford <40455550+scorpiontornado@users.noreply.github.com> * I have added an import statement for head in the code --------- Co-authored-by: Nicholas Langford <40455550+scorpiontornado@users.noreply.github.com> --- components/Navigation.jsx | 9 --------- pages/nominations.jsx | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/components/Navigation.jsx b/components/Navigation.jsx index 450b264..6fdcce8 100644 --- a/components/Navigation.jsx +++ b/components/Navigation.jsx @@ -155,15 +155,6 @@ const Navigation = () => { - - - - Nominations - - - diff --git a/pages/nominations.jsx b/pages/nominations.jsx index d28622d..aef7efe 100644 --- a/pages/nominations.jsx +++ b/pages/nominations.jsx @@ -1,4 +1,5 @@ import React from "react"; +import Head from "next/head"; // reactstrap components import { Row, Col, Container, Button } from "reactstrap"; @@ -18,6 +19,8 @@ import styles from "styles/modules/nominations.module.scss"; const Nominations = () => { const [showModal, setShowModal] = useState(false); const [nominee, setNominee] = useState({}); + const showNominations = false; // Change this to true when nominations are open + // Given a person's name, returns all roles they're nominated for const getNominatedRoles = (name) => { @@ -43,8 +46,39 @@ const Nominations = () => { setShowModal(!showModal); }; + if (!showNominations) { + return ( + <> + + Nominations | UNSW Co-op Society + + +
+ + +

VOTING CLOSED

+ +
+ + + + +

+ Thank you for participating! The voting process for the new executive team has concluded. Come back at the end of this year for the next round of nominations! +

+ +
+
+
+ + ); + } + return ( <> + + Nominations | UNSW Co-op Society +
{/* Title */}