Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Button, Col, Row } from "reactstrap";
import { Button } from "reactstrap";
import { useHistory, useLocation } from "react-router-dom";
import { persistence, KEY } from "../../../../services";

Expand Down Expand Up @@ -28,15 +28,13 @@ const CompetitionButton = ({ buttons }: CompetitionButtonProps) => {
};

return (
<Row>
<>
{buttons.map(({ to, label }) => (
<Col xs={12} className="py-1" key={to}>
<Button size="lg" onClick={() => handleClick(to)} block className="primary-button text-light">
{label}
</Button>
</Col>
<Button key={to} size="lg" onClick={() => handleClick(to)} className="primary-button text-light">
{label}
</Button>
))}
</Row>
</>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import { isStudent, isAdmin, isTeacher } from "../../../../services";
import CompetitionWrapper from "../CompetitionWrapper";
import { CLOSED_MESSAGE, STUDENT_MESSAGE, TEACHER_MESSAGE } from "../constants";

// EOI button configuration - same as HomepageHighlight
export const eoiButton = {
to: "https://forms.cloud.microsoft/e/K4GmaA3QEF",
label: "Express your interest",
};

const StudentMessage = () => (
<Container>
<Col className="d-flex flex-column align-items-start pb-4 pl-0" xs="auto">
Expand Down Expand Up @@ -36,12 +42,6 @@ interface EntryFormHandlerProps {
const EntryFormHandler = ({ buttons, handleTermsClick }: EntryFormHandlerProps) => {
const user = useAppSelector(selectors.user.orNull);

// EOI button configuration - same as HomepageHighlight
const eoiButton = {
to: "https://forms.office.com/e/23bsQuZfjm",
label: "Express your interest",
};

const renderEntryForm = () => {
// Revert this: Only ADMIN users can see and submit the competition form
if (isAdmin(user) || isTeacher(user)) {
Expand All @@ -59,13 +59,8 @@ const EntryFormHandler = ({ buttons, handleTermsClick }: EntryFormHandlerProps)

return (
<CompetitionWrapper
beforeCompetitionOpenContent={
<Container>
<Col className="d-flex flex-column align-items-start pb-4 pl-0" xs="auto">
<CompetitionButton buttons={[eoiButton]} />
</Col>
</Container>
}
// EOI button is rendered in the headline text column for correct alignment
beforeCompetitionOpenContent={null}
closedCompetitionContent={
<Container>
<Col className="d-flex flex-column align-items-start pb-4 pl-0" xs="auto">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ const HomepageHighlight = () => {
const getBannerContent = () => {
if (isBeforeCompetitionOpenDate(currentDate)) {
return {
subtitle:
"Some users are experiencing issues when attempting questions on mobile devices, including iPads. Please use a computer for now if possible while we fix this. Thank you for your patience.",
title: "National Computer Science Competition 2026/27",
subtitle: "Opening October 2026",
button: {
to: "https://forms.cloud.microsoft/e/K4GmaA3QEFn",
label: "Be the first one to know",
},
};
} else if (isAfterCompetitionOpenDateAndBeforeCompetitionEndDate(currentDate)) {
return {
Expand Down
14 changes: 11 additions & 3 deletions src/app/components/pages/IsaacCompetition/IsaacCompetition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import "../../../../scss/cs/competition.scss";
import Accordion from "./Accordion/Accordion";
import InformationCard from "./CompetitionInformation/InformationCard";
import CompetitionTimeline from "./CompetitionInformation/CompetitionTimeline";
import EntryFormHandler from "./EntryForm/EntryFormHandler";
import EntryFormHandler, { eoiButton } from "./EntryForm/EntryFormHandler";
import CompetitionButton from "./Buttons/CompetitionButton";
import CompetitionWrapper from "./CompetitionWrapper";
import { liveQandASessionDate } from "./dateUtils";

const { section1, section3, accordion } = content;
Expand Down Expand Up @@ -66,7 +68,7 @@ export const IsaacCompetition = () => {
</Container>
<section id="competition-headline-section">
<Container className="pt-4 z1">
<Row>
<Row className="pb-5">
<h1 className="primary-heading pl-3">National Computer Science Competition</h1>
<Col xs={12} md={6} lg={8} className="pb-3">
<p className="mt-4 body-text">{section1.header.section1}</p>
Expand All @@ -92,7 +94,13 @@ export const IsaacCompetition = () => {
</a>
{` ${section1.note.callToAction}`}
</p>
<Row className="justify-content-left mt-4"></Row>
<Row className="justify-content-left mt-4">
<Col xs="auto">
<CompetitionWrapper beforeCompetitionOpenContent={<CompetitionButton buttons={[eoiButton]} />}>
{null}
</CompetitionWrapper>
</Col>
</Row>
</Col>
<Col lg={4} md={6} className="order-lg-2 order-3 mt-4 mt-lg-0 pb-md-0">
<img
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/pages/IsaacCompetition/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
"Calling all computer science fans! We are hosting a national competition to challenge students to imagine, design, and pitch a groundbreaking new product for the Internet of Everything (IOE).",
],
section2: [
"The competition is a fantastic opportunity for students to apply their knowledge to real-world ideas. Entries open in November 2025 and last until the end of February 2026.",
"The competition is a fantastic opportunity for students to apply their knowledge to real-world ideas.",
],
},
note: {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/pages/IsaacCompetition/dateUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//Expression of interest banner will be shown till midnight on 2 Nov 2025. Entries open banner will be displayed after this till COMPETITION_END_DATE
//The competition entry form will be displayed on the Events -> National Competition page after this date.
export const COMPETITION_OPEN_DATE = new Date("2026-05-20T23:59:59Z"); // UTC timezone
export const COMPETITION_OPEN_DATE = new Date("2026-09-30T23:59:59Z"); // UTC timezone

//The Entries open banner will be displayed till midnight on 28 Feb 2026. Entries closed banner will be displayed after this till ENTRIES_CLOSED_BANNER_END_DATE
export const COMPETITION_END_DATE = new Date("2026-02-28T23:59:59Z"); // UTC timezone
Expand Down
1 change: 1 addition & 0 deletions src/scss/cs/homepage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@
// ----------------------------------------------

.homepage-highlight {
padding-top: 30px;
background-color: #ffdf80;

&-title {
Expand Down
Loading