Skip to content

Commit

Permalink
Merge pull request #177 from ugahacks/feature/cleaning-up
Browse files Browse the repository at this point in the history
removed uh9 registration
  • Loading branch information
shawnpradeep authored Feb 3, 2024
2 parents 8b19918 + 3108edf commit 8c1939e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions projects/mybyte/components/EventRect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export default function EventRect(props: {
}
let statusName: string = "open";
let statusClass: string = "border-green-800 text-green-700";
let dup = new Date(props.event.endDate);
dup.setDate(props.event.endDate.getDate() + 1);
let dup = new Date(props.event.deadline);
dup.setDate(props.event.deadline.getDate() + 1);
if (new Date() > dup) {
statusName = "closed";
statusClass = "border-primary-500 text-primary-500";
Expand Down
12 changes: 7 additions & 5 deletions projects/mybyte/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const Hacks9: EventDetail = {
startDate: new Date("02/09/2024"),
endDate: new Date("02/11/2024"),
deadline: new Date("02/02/2024"),
// Add in person attribute
};

const ESports: EventDetail = {
Expand All @@ -25,14 +24,15 @@ const ESports: EventDetail = {
image: "/eSports9_banner.png",
startDate: new Date("02/09/2024"),
endDate: new Date("02/11/2024"),
deadline: new Date("02/04/2024"),
// Add in person attribute
deadline: new Date("02/09/2024"),
};

const events = [
{
event: (re: EventRegistered) => {
if (!re.HACKS9) {
if (Hacks9.deadline < new Date()) {
return <EventRect disabled={true} event={Hacks9} />;
} else if (!re.HACKS9) {
return <EventRect disabled={false} event={Hacks9} />;
} else {
return <EventRect disabled={true} event={Hacks9} />;
Expand All @@ -44,7 +44,9 @@ const events = [
},
{
event: (re: any) => {
if (!re.HACKS9 || !re || re.ESPORTS9) {
if (ESports.deadline < new Date()) {
return <EventRect disabled={true} event={ESports} />;
} else if (!re.HACKS9 || !re || re.ESPORTS9) {
return <EventRect disabled={true} event={ESports} />;
} else {
return <EventRect disabled={false} event={ESports} />;
Expand Down

0 comments on commit 8c1939e

Please sign in to comment.