stats reorg, upcoming refinement
This commit is contained in:
@@ -2,7 +2,8 @@ import { Box, Text } from "@mantine/core";
|
||||
import Header from "./header";
|
||||
import SwipeableTabs from "@/components/swipeable-tabs";
|
||||
import TournamentList from "@/features/tournaments/components/tournament-list";
|
||||
import { useTeam } from "../../queries";
|
||||
import StatsOverview from "@/shared/components/stats-overview";
|
||||
import { useTeam, useTeamStats } from "../../queries";
|
||||
|
||||
interface ProfileProps {
|
||||
id: string;
|
||||
@@ -10,12 +11,13 @@ interface ProfileProps {
|
||||
|
||||
const TeamProfile = ({ id }: ProfileProps) => {
|
||||
const { data: team } = useTeam(id);
|
||||
const { data: stats, isLoading: statsLoading, error: statsError } = useTeamStats(id);
|
||||
if (!team) return <Text p="md">Team not found</Text>;
|
||||
|
||||
const tabs = [
|
||||
{
|
||||
label: "Overview",
|
||||
content: <Text p="md">Stats/Badges will go here</Text>,
|
||||
content: <StatsOverview statsData={statsError ? null : stats || null} isLoading={statsLoading} />,
|
||||
},
|
||||
{
|
||||
label: "Matches",
|
||||
|
||||
Reference in New Issue
Block a user