various improvements, edit tournament, etc

This commit is contained in:
yohlo
2025-08-24 22:56:48 -05:00
parent 936ab0ce72
commit 2b8ccf1649
25 changed files with 504 additions and 52 deletions

View File

@@ -15,15 +15,15 @@ const Profile = ({ player }: ProfileProps) => {
label: "Overview",
content: <Text p="md">Stats/Badges will go here</Text>
},
{
label: "Matches",
content: <Text p="md">Matches feed will go here</Text>
},
{
label: "Teams",
content: <>
<TeamList teams={player.teams || []} />
</>
},
{
label: "Tournaments",
content: <Text p="md">Panel 3 content</Text>
}
];

View File

@@ -1,10 +1,11 @@
import { updatePlayer } from "@/features/players/server";
import { useMutation } from "@tanstack/react-query";
import { Button, Stack, TextInput } from "@mantine/core"
import { Stack, TextInput } from "@mantine/core"
import { useForm } from "@mantine/form";
import toast from "@/lib/sonner";
import { useRouter } from "@tanstack/react-router";
import { Player } from "../../types";
import Button from "@/components/button";
interface NameUpdateFormProps {
player: Player;
@@ -50,8 +51,8 @@ const NameUpdateForm = ({ player, toggle }: NameUpdateFormProps) => {
<Stack gap='xs'>
<TextInput label='First Name' {...form.getInputProps('first_name')} />
<TextInput label='Last Name' {...form.getInputProps('last_name')} />
<Button fullWidth loading={isPending} type='submit'>Save</Button>
<Button fullWidth variant='subtle' color='red' onClick={toggle}>Cancel</Button>
<Button loading={isPending} type='submit'>Save</Button>
<Button variant='subtle' color='red' onClick={toggle}>Cancel</Button>
</Stack>
</form>
)