work on team enrollment
This commit is contained in:
@@ -3,7 +3,8 @@ import Header from "./header";
|
||||
import SwipeableTabs from "@/components/swipeable-tabs";
|
||||
import TournamentList from "@/features/tournaments/components/tournament-list";
|
||||
import StatsOverview from "@/shared/components/stats-overview";
|
||||
import { useTeam, useTeamStats } from "../../queries";
|
||||
import { useTeam, useTeamMatches, useTeamStats } from "../../queries";
|
||||
import MatchList from "@/features/matches/components/match-list";
|
||||
|
||||
interface ProfileProps {
|
||||
id: string;
|
||||
@@ -11,6 +12,7 @@ interface ProfileProps {
|
||||
|
||||
const TeamProfile = ({ id }: ProfileProps) => {
|
||||
const { data: team } = useTeam(id);
|
||||
const { data: matches } = useTeamMatches(id);
|
||||
const { data: stats, isLoading: statsLoading, error: statsError } = useTeamStats(id);
|
||||
if (!team) return <Text p="md">Team not found</Text>;
|
||||
|
||||
@@ -21,7 +23,7 @@ const TeamProfile = ({ id }: ProfileProps) => {
|
||||
},
|
||||
{
|
||||
label: "Matches",
|
||||
content: <Text p="md">Matches feed will go here</Text>,
|
||||
content: <MatchList matches={matches || []} />,
|
||||
},
|
||||
{
|
||||
label: "Tournaments",
|
||||
@@ -35,7 +37,7 @@ const TeamProfile = ({ id }: ProfileProps) => {
|
||||
return (
|
||||
<>
|
||||
<Header name={team.name} logo={team.logo} />
|
||||
<Box m="sm" mt="lg">
|
||||
<Box m="xs" mt="lg">
|
||||
<SwipeableTabs tabs={tabs} />
|
||||
</Box>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user