better brackets, info types

This commit is contained in:
yohlo
2025-09-07 00:52:28 -05:00
parent cb83ea06fa
commit 2396464a19
36 changed files with 678 additions and 657 deletions

View File

@@ -3,6 +3,7 @@ import Header from "./header";
import { Player } from "@/features/players/types";
import SwipeableTabs from "@/components/swipeable-tabs";
import { usePlayer } from "../../queries";
import TeamList from "@/features/teams/components/team-list";
interface ProfileProps {
id: string;
@@ -13,24 +14,26 @@ const Profile = ({ id }: ProfileProps) => {
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: "Teams",
content: <Text p="md">Teams will go here</Text>
}
content: <TeamList teams={player.teams || []} />,
},
];
return <>
<Header player={player} />
<Box m='sm' mt='lg'>
<SwipeableTabs tabs={tabs} />
</Box>
</>;
return (
<>
<Header player={player} />
<Box m="sm" mt="lg">
<SwipeableTabs tabs={tabs} />
</Box>
</>
);
};
export default Profile;

View File

@@ -1,6 +1,12 @@
import { Team } from "@/features/teams/types";
import { TeamInfo } from "@/features/teams/types";
import { z } from 'zod';
export interface PlayerInfo {
id: string;
first_name?: string;
last_name?: string;
}
export interface Player {
id: string;
auth_id?: string;
@@ -8,7 +14,7 @@ export interface Player {
last_name?: string;
created?: string;
updated?: string;
teams?: Team[];
teams?: TeamInfo[];
}
export const playerInputSchema = z.object({