significant refactor

This commit is contained in:
2025-08-30 01:42:23 -05:00
parent 7136f646a3
commit 052f53444e
106 changed files with 1994 additions and 1701 deletions

View File

@@ -1,39 +1,43 @@
import { Box, Text } from "@mantine/core";
import Header from "./header";
import TeamList from "@/features/teams/components/team-list";
import { Team } from "../../types";
import PlayerList from "@/features/players/components/player-list";
import SwipeableTabs from "@/components/swipeable-tabs";
import TournamentList from "@/features/tournaments/components/tournament-list";
import { useTeam } from "../../queries";
interface ProfileProps {
team: Team;
id: string;
}
const TeamProfile = ({ team }: ProfileProps) => {
console.log(team);
const TeamProfile = ({ id }: ProfileProps) => {
const { data: team } = useTeam(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: <Text p="md">Stats/Badges will go here</Text>,
},
{
label: "Matches",
content: <Text p="md">Matches feed will go here</Text>
content: <Text p="md">Matches feed will go here</Text>,
},
{
label: "Tournaments",
content: <>
<TournamentList tournaments={team.tournaments || []} />
</>
}
label: "Tournaments",
content: (
<>
<TournamentList tournaments={team.tournaments || []} />
</>
),
},
];
return <>
<Header team={team} />
<Box m='sm' mt='lg'>
<SwipeableTabs tabs={tabs} />
</Box>
</>;
return (
<>
<Header name={team.name} logo={team.logo} />
<Box m="sm" mt="lg">
<SwipeableTabs tabs={tabs} />
</Box>
</>
);
};
export default TeamProfile;