reactions, match sse, etc

This commit is contained in:
yohlo
2025-09-19 14:08:36 -05:00
parent 602e6e3473
commit f99d6efaf9
20 changed files with 474 additions and 100 deletions

View File

@@ -2,6 +2,7 @@ import { createFileRoute } from "@tanstack/react-router";
import { tournamentQueries, useCurrentTournament } from "@/features/tournaments/queries";
import UpcomingTournament from "@/features/tournaments/components/upcoming-tournament";
import { ensureServerQueryData } from "@/lib/tanstack-query/utils/ensure";
import StartedTournament from "@/features/tournaments/components/started-tournament";
export const Route = createFileRoute("/_authed/")({
component: Home,
@@ -12,7 +13,7 @@ export const Route = createFileRoute("/_authed/")({
return { tournament }
},
loader: ({ context }) => ({
withPadding: true,
withPadding: false,
header: {
title: context.tournament.name || "FLXN"
}
@@ -22,9 +23,9 @@ export const Route = createFileRoute("/_authed/")({
function Home() {
const { data: tournament } = useCurrentTournament();
if (!tournament.matches || tournament.matches.length !== 0) {
if (!tournament.matches || tournament.matches.length === 0) {
return <UpcomingTournament tournament={tournament} />;
}
return <p>Started Tournament</p>
return <StartedTournament tournament={tournament} />
}