Skip to content

Commit

Permalink
Remove nominations page (#56)
Browse files Browse the repository at this point in the history
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 <[email protected]>

* I have added an import statement for head in the code

---------

Co-authored-by: Nicholas Langford <[email protected]>
  • Loading branch information
KKSurendran06 and scorpiontornado authored Jan 17, 2024
1 parent dc19295 commit 5bb706b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 9 deletions.
9 changes: 0 additions & 9 deletions components/Navigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,6 @@ const Navigation = () => {
</Link>
</NavItem>

<NavItem>
<Link href="/nominations" passHref>
<NextNavLink
className={getNavLinkClass("/nominations")}
>
<span className="nav-link-inner--text">Nominations</span>
</NextNavLink>
</Link>
</NavItem>
</Nav>


Expand Down
34 changes: 34 additions & 0 deletions pages/nominations.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react";
import Head from "next/head";

// reactstrap components
import { Row, Col, Container, Button } from "reactstrap";
Expand All @@ -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) => {
Expand All @@ -43,8 +46,39 @@ const Nominations = () => {
setShowModal(!showModal);
};

if (!showNominations) {
return (
<>
<Head>
<title>Nominations | UNSW Co-op Society</title>
</Head>

<section className="section section-lg">
<Row className="justify-content-center text-center ">
<Col lg="8">
<h1 className="animate__animated animate__zoomIn animate__fast">VOTING CLOSED</h1>
</Col>
</Row>

<Container className="py-lg-md d-flex">
<Row className="justify-content-center text-center">
<Col lg="10">
<p className="lead text-muted">
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!
</p>
</Col>
</Row>
</Container>
</section>
</>
);
}

return (
<>
<Head>
<title>Nominations | UNSW Co-op Society</title>
</Head>
<section className="section section-lg">
{/* Title */}
<Row className="justify-content-center text-center">
Expand Down

0 comments on commit 5bb706b

Please sign in to comment.