significant refactor
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { Box, Button, Text, Title } from "@mantine/core";
|
||||
import { Box, Text } from "@mantine/core";
|
||||
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";
|
||||
import { usePlayer } from "../../queries";
|
||||
|
||||
interface ProfileProps {
|
||||
player: Player;
|
||||
id: string;
|
||||
}
|
||||
|
||||
const Profile = ({ player }: ProfileProps) => {
|
||||
const Profile = ({ id }: ProfileProps) => {
|
||||
const { data: player } = usePlayer(id);
|
||||
const tabs = [
|
||||
{
|
||||
label: "Overview",
|
||||
@@ -20,10 +20,8 @@ const Profile = ({ player }: ProfileProps) => {
|
||||
content: <Text p="md">Matches feed will go here</Text>
|
||||
},
|
||||
{
|
||||
label: "Teams",
|
||||
content: <>
|
||||
<TeamList teams={player.teams || []} />
|
||||
</>
|
||||
label: "Teams",
|
||||
content: <Text p="md">Teams will go here</Text>
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user