Skip to content

Commit

Permalink
feat: Add Internal Challenges Card to Challenges (HackerRank) (#69)
Browse files Browse the repository at this point in the history
* add hackerrank problem

* change rule
  • Loading branch information
ImJunny authored Mar 23, 2024
1 parent 9c24d60 commit 99193fe
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
39 changes: 33 additions & 6 deletions src/app/(main)/(routes)/(protected)/challenges/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import { Button } from "@/app/_components/ui/button";
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from "@/app/_components/ui/card";
import { siteConfig } from "@/app/_config/site";
import { type Metadata } from "next";
import Link from "next/link";

export const metadata: Metadata = {
title: "Challenges | HackPSH",
Expand All @@ -7,12 +16,30 @@ export const metadata: Metadata = {

export default function ChallengesPage() {
return (
<div>
<div className="mt-14 flex w-full flex-col items-center justify-center">
<p className="mb-10 text-center text-3xl font-bold tracking-tight">
Challenges
</p>
</div>
<div className="container mt-8 max-w-[52rem]">
<Card className="text-center">
<CardHeader>
<CardTitle>Internal Challenges Coming Soon!</CardTitle>
</CardHeader>
<CardContent className="flex flex-col items-center space-y-4">
<p>
For this event, we will be using Hackerrank to host software
challenges. We are currently working on hosting our own coding
problems for future events!
</p>
<p className="text-muted-foreground">
Teams can use online resources to help them complete challenges.
Teams are able to use AI (ex: ChatGPT), but may only receive half
their total points earned in this category. This rule will be
determined by the event administrators.
</p>
<Button className="w-48" asChild>
<Link href={siteConfig.links.hackerrank} target="_blank">
<span>Software Challenges</span>
</Link>
</Button>
</CardContent>
</Card>
</div>
);
}
4 changes: 3 additions & 1 deletion src/app/_config/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ export const siteConfig = {
emails: {
general: "[email protected]",
},
registration_form: "https://docs.google.com/forms/d/e/1FAIpQLSdkVRX1e8lNruVzWVKgcQ6YOt9NWhkotzOysjU8YdewjDvvTA/viewform",
registration_form:
"https://docs.google.com/forms/d/e/1FAIpQLSdkVRX1e8lNruVzWVKgcQ6YOt9NWhkotzOysjU8YdewjDvvTA/viewform",
location: "https://maps.app.goo.gl/EEXBSXZNzEgM6dhv7",
links: {
linkedin: "https://www.linkedin.com/company/ieee-penn-state-harrisbrurg/",
facebook: "https://www.facebook.com/groups/183119638427039/",
instagram: "https://www.instagram.com/psh.ieee/",
blog: "https://edu.ieee.org/us-psu/",
hackerrank: "https://www.hackerrank.com/hackpsh-spring-2024",
},
paths: {
home: "/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { publicProcedure } from "@/server/trpc";
export default publicProcedure.query(() => {
// passed string should be in UTC; EST+=5 Hours
// account for daylight savings if needed
// proper ISO 8601 format
// proper ISO 8601 format
const eventStartTime = new Date("2024-03-23T14:00:00.000Z");
const timeRemaining = eventStartTime.valueOf() - Date.now();
const eventFinishTime = new Date("2024-03-23T00:00:00.000Z");
Expand Down

0 comments on commit 99193fe

Please sign in to comment.