better brackets, info types
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { List, ListItem, Skeleton, Stack, Text } from "@mantine/core";
|
||||
import Avatar from "@/components/avatar";
|
||||
import { Team } from "@/features/teams/types";
|
||||
import { TeamInfo } from "@/features/teams/types";
|
||||
import { useNavigate } from "@tanstack/react-router";
|
||||
import { useCallback, useMemo } from "react";
|
||||
import React from "react";
|
||||
|
||||
interface TeamListItemProps {
|
||||
team: Team;
|
||||
team: TeamInfo;
|
||||
}
|
||||
const TeamListItem = React.memo(({ team }: TeamListItemProps) => {
|
||||
const playerNames = useMemo(
|
||||
@@ -29,7 +29,7 @@ const TeamListItem = React.memo(({ team }: TeamListItemProps) => {
|
||||
});
|
||||
|
||||
interface TeamListProps {
|
||||
teams: Team[];
|
||||
teams: TeamInfo[];
|
||||
loading?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Player } from "@/features/players/types";
|
||||
import { PlayerInfo } from "@/features/players/types";
|
||||
import { z } from "zod";
|
||||
import { Tournament } from "../tournaments/types";
|
||||
import { TournamentInfo } from "../tournaments/types";
|
||||
|
||||
export interface Team {
|
||||
id: string;
|
||||
@@ -18,8 +18,8 @@ export interface Team {
|
||||
song_image_url: string;
|
||||
created: string;
|
||||
updated: string;
|
||||
players: Player[];
|
||||
tournaments: Tournament[];
|
||||
players: PlayerInfo[];
|
||||
tournaments: TournamentInfo[];
|
||||
}
|
||||
|
||||
export interface TeamInfo {
|
||||
@@ -27,6 +27,7 @@ export interface TeamInfo {
|
||||
name: string;
|
||||
primary_color: string;
|
||||
accent_color: string;
|
||||
players: PlayerInfo[];
|
||||
}
|
||||
|
||||
export const teamInputSchema = z
|
||||
|
||||
Reference in New Issue
Block a user