diff --git a/app/(landing)/page.tsx b/app/(landing)/page.tsx new file mode 100644 index 0000000..9ab5e58 --- /dev/null +++ b/app/(landing)/page.tsx @@ -0,0 +1,21 @@ +import AcmeLogo from '@/app/ui/acme-logo'; +import { ArrowRightIcon } from '@heroicons/react/24/outline'; +import Link from 'next/link'; +import { lusitana } from '@/app/ui/fonts'; +import Image from 'next/image'; +import Hero from './sections/Hero'; +import Schedule from './sections/Schedule'; +import { Suspense } from 'react'; + +export default function Page() { + return ( +
+
+ + Loading Schedule!}> + + +
+
+ ); +} diff --git a/app/(landing)/sections/Hero.tsx b/app/(landing)/sections/Hero.tsx new file mode 100644 index 0000000..ecd9017 --- /dev/null +++ b/app/(landing)/sections/Hero.tsx @@ -0,0 +1,15 @@ +export default function Hero() { + return ( +
+

+ HackRU! +

+ + Hack all knight looonnnggg + +
+ ); +} \ No newline at end of file diff --git a/app/(landing)/sections/Schedule.tsx b/app/(landing)/sections/Schedule.tsx new file mode 100644 index 0000000..21eb095 --- /dev/null +++ b/app/(landing)/sections/Schedule.tsx @@ -0,0 +1,43 @@ +import { getSchedule } from "@/app/lib/data"; + +function ScheduleOfTheDay(props: { dayInfo: DayInfo }) { + const { dayInfo } = props; + const { day, times } = dayInfo; + return ( +
+
{dayInfo.day}
+
+ {times.map((timeInfo, index) => ( +
+
{timeInfo.time}
+
+ {timeInfo.event} +
+ +
+ ))} +
+
+ ); + +} + +export default async function Schedule() { + const schedule = await getSchedule(); + + return ( +
+
+
+ +
+ +
+
+
+ ); +} \ No newline at end of file diff --git a/app/(landing)/sections/Sponsors.tsx b/app/(landing)/sections/Sponsors.tsx new file mode 100644 index 0000000..e69de29 diff --git a/app/lib/data.ts b/app/lib/data.ts index 9fb3519..2dd4350 100644 --- a/app/lib/data.ts +++ b/app/lib/data.ts @@ -11,6 +11,48 @@ import { import { formatCurrency } from './utils'; import { unstable_noStore as noStore } from 'next/cache'; +export async function getSchedule() { + //a fake delay to simulate a real api call + await new Promise((resolve) => setTimeout(resolve, 1000)); + + const schedule: Schedule = { + "Saturday": { + "day": "Saturday", + "times": [ + { "time": "10:00 AM", "event": "Check-in starts" }, + { "time": "11:00 AM", "event": "Opening Ceremony", }, + { "time": "12:00 PM", "event": "Team Building Event" }, + { "time": "12:00 PM", "event": "Hacking Starts" }, + { "time": "12:30 PM", "event": "Lunch" }, + { "time": "1:30 PM", "event": "NJ TRANSIT API Demo" }, + { "time": "2:00 PM", "event": "Algorithms in Society Workshop by Ethitech" }, + { "time": "2:30 PM", "event": "MLH Mini Event" }, + { "time": "5:30 PM", "event": "Tech Talk by NJ TRANSIT" }, + { "time": "8:00 PM", "event": "Dinner" }, + + ], + }, + + "Sunday": { + "day": "Sunday", + "times": [ + { "time": "12:00 AM", "event": "Midnight Surprise" }, + { "time": "8:00 AM", "event": "Breakfast", }, + // { "time": "11:00 AM", "event": "Event" }, + { "time": "12:00 PM", "event": "Submissions Due" }, + { "time": "12:30 PM", "event": "Lunch", }, + { "time": "1:00 PM", "event": "Judging Begins" }, + { "time": "3:00 PM", "event": "Judging Ends" }, + { "time": "3:30 PM", "event": "Closing Ceremony", }, + // { "time": "7:00 PM", "event": "Dinner", "reactIcon": }, + // { "time": "9:00 PM", "event": "Venue closes" }, + ], + } + }; + + return schedule; +} + export async function fetchRevenue() { // Add noStore() here prevent the response from being cached. // This is equivalent to in fetch(..., {cache: 'no-store'}). diff --git a/app/page.tsx b/app/page.tsx deleted file mode 100644 index 2758e2c..0000000 --- a/app/page.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import AcmeLogo from '@/app/ui/acme-logo'; -import { ArrowRightIcon } from '@heroicons/react/24/outline'; -import Link from 'next/link'; -import { lusitana } from '@/app/ui/fonts'; -import Image from 'next/image'; - -export default function Page() { - return ( -
-
- -
-
-
-

- Welcome to Acme. This is the example for the{' '} - - Next.js Learn Course - - , brought to you by Vercel. -

- - Log in - -
-
- {/* Add Hero Images Here */} - Screenshots of the dashboard project showing desktop version - Screenshot of the dashboard project showing mobile version -
-
-
- ); -} diff --git a/types/global.d.ts b/types/global.d.ts new file mode 100644 index 0000000..de5997c --- /dev/null +++ b/types/global.d.ts @@ -0,0 +1,7 @@ +interface DayInfo { + day: string, + times: { time: string, event: string }[] +} + +type day = string +type Schedule = Record; \ No newline at end of file