-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HMT-116/nav bar for judge page (#190)
- Loading branch information
1 parent
91f6c4d
commit e1d1e83
Showing
6 changed files
with
127 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { NavBar } from "@/components/judging/Navbar"; | ||
|
||
const AssignedTeamsPage = () => { | ||
const assignedTeams = [ | ||
{ id: 1, name: "Team Alpha" }, | ||
{ id: 2, name: "Team Beta" }, | ||
{ id: 3, name: "Team Gamma" }, | ||
]; | ||
|
||
return ( | ||
<div> | ||
<NavBar /> | ||
<h1> Put assinged teams here Assigned Teams</h1> | ||
<ul> | ||
{assignedTeams.map((team) => ( | ||
<li key={team.id}>{team.name}</li> | ||
))} | ||
</ul> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AssignedTeamsPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { NavBar } from "@/components/judging/Navbar"; | ||
|
||
const RubricPage = () => { | ||
return ( | ||
<div> | ||
<NavBar /> | ||
<h1>Judging Rubric here</h1> | ||
<ul></ul> | ||
</div> | ||
); | ||
}; | ||
|
||
export default RubricPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
"use client"; | ||
|
||
import { useEffect, useState } from "react"; | ||
|
||
interface Schedule { | ||
teamName: string; | ||
timeSlot: string; | ||
} | ||
|
||
const SchedulePage = () => { | ||
const [schedule, setSchedule] = useState<Schedule[]>([]); | ||
|
||
useEffect(() => { | ||
// Fetch schedule data from an API or define it statically | ||
// Template for when we will fetch the schedule | ||
const fetchSchedule = async () => { | ||
const response = await fetch("/api/schedule"); | ||
const data = await response.json(); | ||
setSchedule(data); | ||
}; | ||
|
||
fetchSchedule(); | ||
}, []); | ||
|
||
return ( | ||
<div> | ||
<h1>Judging Schedule</h1> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Team Name</th> | ||
<th>Time Slot</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{schedule.map((item, index) => ( | ||
<tr key={index}> | ||
<td>{item.teamName}</td> | ||
<td>{item.timeSlot}</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SchedulePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
"use client"; | ||
|
||
import Link from "next/link"; | ||
|
||
export function NavBar() { | ||
// Will add the actual routes when the pages are | ||
const navigation = [ | ||
{ | ||
name: "Dashboard", | ||
href: "/judging", | ||
}, | ||
{ | ||
name: "Schedule", | ||
href: "/judging/schedule", | ||
}, | ||
{ | ||
name: "Assigned Teams", | ||
href: "/judging/assigned-teams", | ||
}, | ||
{ | ||
name: "Rubric", | ||
href: "/judging/rubric", | ||
}, | ||
]; | ||
|
||
return ( | ||
<nav className="border-b bg-white text-awesomer-purple"> | ||
<div className="mx-auto flex h-20 items-center justify-center space-x-48 pl-8"> | ||
{navigation.map((item) => { | ||
return ( | ||
<Link key={item.name} href={item.href} className="text-2xl"> | ||
{item.name} | ||
</Link> | ||
); | ||
})} | ||
</div> | ||
</nav> | ||
); | ||
} |