import { List } from "@mantine/core";
import { useTournaments } from "@/features/tournaments/queries";
import ListLink from "@/components/list-link";

const ManageTournaments = () => {
  const { data: tournaments } = useTournaments();
  return (
    <List p="0">
      {tournaments.map((t) => (
        <ListLink key={t.id} label={t.name} to={`/admin/tournaments/${t.id}`} />
      ))}
    </List>
  );
};

export default ManageTournaments;
