stats reorg, upcoming refinement

This commit is contained in:
yohlo
2025-09-14 23:10:05 -05:00
parent 8efc0a7a4b
commit 9a105b30c6
18 changed files with 703 additions and 373 deletions

View File

@@ -20,6 +20,7 @@ import { playerQueries } from "@/features/players/queries";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { ensureServerQueryData } from "@/lib/tanstack-query/utils/ensure";
import FullScreenLoader from "@/components/full-screen-loader";
import { scan } from "react-scan";
export const Route = createRootRouteWithContext<{
queryClient: QueryClient;
@@ -105,6 +106,12 @@ function RootComponent() {
// todo: analytics -> process.env data-website-id
function RootDocument({ children }: { children: React.ReactNode }) {
React.useEffect(() => {
scan({
enabled: true,
});
}, []);
return (
<html
{...mantineHtmlProps}

View File

@@ -21,9 +21,8 @@ export const Route = createFileRoute("/_authed/")({
function Home() {
const { data: tournament } = useCurrentTournament();
const now = new Date();
if (new Date(tournament.start_time) > now) {
if (!tournament.matches || tournament.matches.length === 0) {
return <UpcomingTournament tournament={tournament} />;
}