File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ import Image from "next/image" ;
2+ import { title } from "process" ;
3+ import * as React from "react" ;
4+
5+ export default function ProgressBar ( { pageName } : { pageName : string } ) {
6+ let progress = 0 ;
7+ let titleName = "" ;
8+ switch ( pageName ) {
9+ case "schedule" :
10+ progress = 0 ;
11+ titleName = "Schedule" ;
12+ break ;
13+ case "format-rules" :
14+ progress = 25 ;
15+ titleName = "Format Rules" ;
16+ break ;
17+ case "leaderboard" :
18+ titleName = "Leaderboard" ;
19+ progress = 50 ;
20+ break ;
21+ case "sponsor-guest" :
22+ titleName = "Sponsor & Guest" ;
23+ progress = 75 ;
24+ break ;
25+ }
26+
27+ return (
28+ < div >
29+ < 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 >
32+ </ div >
33+ < div className = "flex flex-1" >
34+ < div
35+ className = "flex-shrink-0"
36+ style = { {
37+ width : `${ progress } %` ,
38+ transition : "width 3s ease-in-out" ,
39+ } }
40+ />
41+ < div >
42+ < Image
43+ src = "/Drone.svg"
44+ alt = "Drone"
45+ width = "50"
46+ height = "20"
47+ className = "object-contain"
48+ />
49+ </ div >
50+
51+ < div className = "ml-auto" >
52+ < Image
53+ src = "/FinishFlag.svg"
54+ alt = "Finish Flag"
55+ width = "50"
56+ height = "20"
57+ className = "object-contain"
58+ />
59+ </ div >
60+ </ div >
61+
62+ < div className = "flex w-full" >
63+ < div className = "h-[2px] w-full bg-black" />
64+ </ div >
65+ </ div >
66+ </ div >
67+ ) ;
68+ }
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { cn } from "@/lib/utils";
66
77import { Button } from "../components/ui/button" ;
88import Navbar from "../components/ui/navbar" ;
9+ import ProgressBar from "../components/ui/progress" ;
910
1011const fontSans = FontSans ( {
1112 subsets : [ "latin" ] ,
@@ -27,6 +28,9 @@ export default function Home() {
2728 fontSans . variable ,
2829 ) }
2930 >
31+ < div className = "mt-4 w-full justify-center" >
32+ < ProgressBar pageName = "schedule" />
33+ </ div >
3034 < h1 className = "title-large text-dark" > Title Test</ h1 >
3135 < Button onClick = { ( ) => setClicked ( true ) } >
3236 { isLoading ? "Loading" : "Ping" }
You can’t perform that action at this time.
0 commit comments