Skip to content

Commit 911e8b9

Browse files
committed
Linked progress bar to all pages, adjusted styling
1 parent ae21c10 commit 911e8b9

7 files changed

Lines changed: 26 additions & 59 deletions

File tree

client/src/components/ui/progress.tsx

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Image from "next/image";
2-
import { title } from "process";
32
import * as React from "react";
43

54
export default function ProgressBar({ pageName }: { pageName: string }) {
@@ -8,27 +7,27 @@ export default function ProgressBar({ pageName }: { pageName: string }) {
87
switch (pageName) {
98
case "schedule":
109
progress = 0;
11-
titleName = "Schedule";
10+
titleName = "Drone Competition Schedule";
1211
break;
1312
case "format-rules":
14-
progress = 25;
15-
titleName = "Format Rules";
13+
progress = 33;
14+
titleName = "Format & Rules";
15+
break;
16+
case "guests-sponsors":
17+
titleName = "Guests & Sponsors";
18+
progress = 66;
1619
break;
1720
case "leaderboard":
1821
titleName = "Leaderboard";
19-
progress = 50;
20-
break;
21-
case "sponsor-guest":
22-
titleName = "Sponsor & Guest";
23-
progress = 75;
22+
progress = 90;
2423
break;
2524
}
2625

2726
return (
2827
<div>
2928
<div className="customerBar w-full flex-col justify-center gap-2">
30-
<div className="mb-10 flex items-center justify-center">
31-
<a className="title-large">{titleName}</a>
29+
<div className="mb-4 flex items-center justify-center">
30+
<a className="title-large text-dark">{titleName}</a>
3231
</div>
3332
<div className="flex flex-1">
3433
<div
@@ -52,15 +51,15 @@ export default function ProgressBar({ pageName }: { pageName: string }) {
5251
<Image
5352
src="/FinishFlag.svg"
5453
alt="Finish Flag"
55-
width="50"
56-
height="20"
54+
width="25"
55+
height="10"
5756
className="object-contain"
5857
/>
5958
</div>
6059
</div>
6160

6261
<div className="flex w-full">
63-
<div className="h-[2px] w-full bg-black" />
62+
<div className="h-[2px] w-full bg-dark" />
6463
</div>
6564
</div>
6665
</div>

client/src/pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import type { AppProps } from "next/app";
66
import { Montserrat, Plus_Jakarta_Sans, Work_Sans } from "next/font/google";
77

88
import Footer from "../components/ui/footer";
9-
// import { cn } from "@/lib/utils";
109
import Navbar from "../components/ui/navbar";
1110

1211
const fontMontserrat = Montserrat({
@@ -33,6 +32,7 @@ export default function App({ Component, pageProps }: AppProps) {
3332
>
3433
<QueryClientProvider client={queryClient}>
3534
<ReactQueryDevtools initialIsOpen={false} />
35+
<Navbar />
3636
<div className="w-full">
3737
<main className="mx-auto flex min-h-screen max-w-7xl flex-col items-center gap-4 p-24">
3838
<Component {...pageProps} />

client/src/pages/format-rules.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useState } from "react";
33
import { usePings } from "@/hooks/pings";
44

55
import { Button } from "../components/ui/button";
6+
import ProgressBar from "../components/ui/progress";
67

78
export default function Home() {
89
const [clicked, setClicked] = useState(false);
@@ -12,7 +13,9 @@ export default function Home() {
1213

1314
return (
1415
<>
15-
<h1 className="title-large text-dark">Title Test</h1>
16+
<div className="mt-4 w-full justify-center">
17+
<ProgressBar pageName="format-rules" />
18+
</div>
1619
<Button onClick={() => setClicked(true)}>
1720
{isLoading ? "Loading" : "Ping"}
1821
</Button>

client/src/pages/guests-sponsors.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useState } from "react";
33
import { usePings } from "@/hooks/pings";
44

55
import { Button } from "../components/ui/button";
6+
import ProgressBar from "../components/ui/progress";
67

78
export default function Home() {
89
const [clicked, setClicked] = useState(false);
@@ -12,7 +13,9 @@ export default function Home() {
1213

1314
return (
1415
<>
15-
<h1 className="title-large text-dark">Title Test</h1>
16+
<div className="mt-4 w-full justify-center">
17+
<ProgressBar pageName="guests-sponsors" />
18+
</div>
1619
<Button onClick={() => setClicked(true)}>
1720
{isLoading ? "Loading" : "Ping"}
1821
</Button>

client/src/pages/leaderboard.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useState } from "react";
33
import { usePings } from "@/hooks/pings";
44

55
import { Button } from "../components/ui/button";
6+
import ProgressBar from "../components/ui/progress";
67

78
export default function Home() {
89
const [clicked, setClicked] = useState(false);
@@ -12,7 +13,9 @@ export default function Home() {
1213

1314
return (
1415
<>
15-
<h1 className="title-large text-dark">Title Test</h1>
16+
<div className="mt-4 w-full justify-center">
17+
<ProgressBar pageName="leaderboard" />
18+
</div>
1619
<Button onClick={() => setClicked(true)}>
1720
{isLoading ? "Loading" : "Ping"}
1821
</Button>

client/src/pages/schedule.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export default function Home() {
1616
<div className="mt-4 w-full justify-center">
1717
<ProgressBar pageName="schedule" />
1818
</div>
19-
<h1 className="title-large text-dark">Title Test</h1>
2019
<Button onClick={() => setClicked(true)}>
2120
{isLoading ? "Loading" : "Ping"}
2221
</Button>

client/src/pages/sponsor-guest.tsx

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)