admin progress
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { Title, List, Divider } from "@mantine/core";
|
||||
import ListLink from "@/components/list-link";
|
||||
import Page from "@/components/page";
|
||||
import { TrophyIcon } from "@phosphor-icons/react";
|
||||
import { TrophyIcon, UsersFourIcon, UsersThreeIcon } from "@phosphor-icons/react";
|
||||
import ListButton from "@/components/list-button";
|
||||
|
||||
const AdminPage = () => {
|
||||
return (
|
||||
|
||||
24
src/features/admin/components/manage-tournaments.tsx
Normal file
24
src/features/admin/components/manage-tournaments.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { List } from "@mantine/core";
|
||||
import Page from "@/components/page";
|
||||
import { TrophyIcon, UsersThreeIcon } from "@phosphor-icons/react";
|
||||
import ListButton from "@/components/list-button";
|
||||
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
||||
import { tournamentQueries } from "@/features/tournaments/queries";
|
||||
|
||||
const ManageTournaments = () => {
|
||||
const { data: tournaments } = useSuspenseQuery(tournamentQueries.list());
|
||||
return (
|
||||
<List>
|
||||
<ListButton
|
||||
label="Edit Enrolled Teams"
|
||||
Icon={UsersThreeIcon}
|
||||
handleClick={console.log}
|
||||
/>
|
||||
{tournaments.map(t => (
|
||||
<ListButton label={t.name} Icon={TrophyIcon} handleClick={console.log} />
|
||||
))}
|
||||
</List>
|
||||
);
|
||||
};
|
||||
|
||||
export default ManageTournaments;
|
||||
Reference in New Issue
Block a user