-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split score board into lazy loaded bundle to avoid having to have mot…
…ion js in the default bundle
- Loading branch information
Showing
5 changed files
with
35 additions
and
35 deletions.
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
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,29 @@ | ||
function FirstPlace({ ...props }) { | ||
return <img src="/balancer/icons/first-place.svg" {...props} />; | ||
} | ||
|
||
function SecondPlace({ ...props }) { | ||
return <img src="/balancer/icons/second-place.svg" {...props} />; | ||
} | ||
|
||
function ThirdPlace({ ...props }) { | ||
return <img src="/balancer/icons/third-place.svg" {...props} />; | ||
} | ||
|
||
export function PositionDisplay({ place }: { place: number }) { | ||
switch (place) { | ||
case 1: | ||
return <FirstPlace className="h-10" />; | ||
case 2: | ||
return <SecondPlace className="h-10" />; | ||
case 3: | ||
return <ThirdPlace className="h-10" />; | ||
default: | ||
return ( | ||
<> | ||
<small>#</small> | ||
{place} | ||
</> | ||
); | ||
} | ||
} |
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
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