swipeable tabs using mantine carousel

This commit is contained in:
yohlo
2025-08-24 10:41:31 -05:00
parent fb1e4c3ee7
commit 1015f63f7e
6 changed files with 153 additions and 5 deletions

View File

@@ -3,18 +3,38 @@ import Header from "./header";
import { testEvent } from "@/utils/test-event";
import { Player } from "@/features/players/types";
import TeamList from "@/features/teams/components/team-list";
import SwipeableTabs from "@/components/swipeable-tabs";
interface ProfileProps {
player: Player;
}
const Profile = ({ player }: ProfileProps) => {
const tabs = [
{
label: "Overview",
content: <Text p="md">Panel 1 content</Text>
},
{
label: "Teams",
content: <Text p="md">Panel 2 content</Text>
},
{
label: "Stats",
content: <Text p="md">Panel 3 content</Text>
}
];
return <>
<Header player={player} />
<Box m='sm' mt='lg'>
<Text size='xl' fw={600}>Teams</Text>
<TeamList teams={player.teams ?? []} />
<SwipeableTabs
tabs={tabs}
defaultTab={0}
onTabChange={(index, tab) => {
console.log(`Switched to ${tab.label} tab`);
}}
/>
</Box>
</>;
};