minor cleanup

This commit is contained in:
yohlo
2025-09-21 11:38:10 -05:00
parent 1027b49258
commit fc3f626313
4 changed files with 8 additions and 4 deletions

View File

@@ -6,14 +6,16 @@ interface ListLinkProps {
label: string; label: string;
to: string; to: string;
Icon?: Icon; Icon?: Icon;
disabled?: boolean
} }
const ListLink = ({ label, to, Icon }: ListLinkProps) => { const ListLink = ({ label, to, Icon, disabled=false }: ListLinkProps) => {
const navigate = useNavigate(); const navigate = useNavigate();
return ( return (
<> <>
<NavLink <NavLink
disabled={disabled}
w="100%" w="100%"
p="md" p="md"
component={"button"} component={"button"}

View File

@@ -8,6 +8,7 @@ import SongSearch from "./song-search";
import DurationPicker from "./duration-picker"; import DurationPicker from "./duration-picker";
import SongSummary from "./song-summary"; import SongSummary from "./song-summary";
import { MusicNote } from "@phosphor-icons/react/dist/ssr"; import { MusicNote } from "@phosphor-icons/react/dist/ssr";
import { MusicNoteIcon } from "@phosphor-icons/react";
interface Song { interface Song {
song_id: string; song_id: string;
@@ -117,7 +118,7 @@ const SongPickerComponent = ({ value: song, onChange, formValues }: SongPickerCo
radius="md" radius="md"
bg="transparent" bg="transparent"
> >
{!song?.song_image_url && <MusicNote size={24} color="var(--mantine-color-dimmed)" />} {!song?.song_image_url && <MusicNoteIcon size={24} color="var(--mantine-color-dimmed)" />}
</Avatar> </Avatar>
<div> <div>
<Text size="sm" fw={500} c={song?.song_name ? undefined : "dimmed"}> <Text size="sm" fw={500} c={song?.song_name ? undefined : "dimmed"}>

View File

@@ -69,8 +69,8 @@ const StartedTournament: React.FC<{ tournament: Tournament }> = ({
to={`/tournaments/${tournament.id}/bracket`} to={`/tournaments/${tournament.id}/bracket`}
Icon={TreeStructureIcon} Icon={TreeStructureIcon}
/> />
<RulesListButton tournamentId={tournament.id} />
<TeamListButton teams={tournament.teams || []} /> <TeamListButton teams={tournament.teams || []} />
<RulesListButton tournamentId={tournament.id} />
</Box> </Box>
</Stack> </Stack>
); );

View File

@@ -128,9 +128,10 @@ const UpcomingTournament: React.FC<{ tournament: Tournament }> = ({
label={`View Bracket`} label={`View Bracket`}
to={`/tournaments/${tournament.id}/bracket`} to={`/tournaments/${tournament.id}/bracket`}
Icon={TreeStructureIcon} Icon={TreeStructureIcon}
disabled
/> />
<RulesListButton tournamentId={tournament.id} />
<TeamListButton teams={tournament.teams || []} /> <TeamListButton teams={tournament.teams || []} />
<RulesListButton tournamentId={tournament.id} />
</Box> </Box>
</Stack> </Stack>
); );