upcoming tournament page, minor changes

This commit is contained in:
yohlo
2025-09-09 23:20:19 -05:00
parent c5d69f1a19
commit c74da09bde
29 changed files with 1125 additions and 46 deletions

View File

@@ -1,27 +1,21 @@
import { createFileRoute } from "@tanstack/react-router";
import { TrophyIcon } from "@phosphor-icons/react";
import ListLink from "@/components/list-link";
import { Box, Divider, Text } from "@mantine/core";
import { useCurrentTournament } from "@/features/tournaments/queries";
import UpcomingTournament from "@/features/tournaments/components/upcoming-tournament";
export const Route = createFileRoute("/_authed/")({
component: Home,
loader: () => ({
withPadding: false
})
withPadding: true,
}),
});
function Home() {
return (
<>
<Box h='60vh' p="md">
<Text m='16vh' fw={500}>Some Content Here</Text>
</Box>
const { data: tournament } = useCurrentTournament();
const now = new Date();
<Box>
<Text pl='md'>Quick Links</Text>
<Divider />
<ListLink label="All Tournaments" to="/tournaments" Icon={TrophyIcon} />
</Box>
</>
);
if (new Date(tournament.start_time) > now) {
return <UpcomingTournament tournament={tournament} />;
}
return <p>Started Tournament</p>
}