style upgrades
This commit is contained in:
@@ -2,10 +2,11 @@ import { useAuth } from "@/contexts/auth-context";
|
||||
import { useTournaments } from "../queries";
|
||||
import { useSheet } from "@/hooks/use-sheet";
|
||||
import { Button, Stack } from "@mantine/core";
|
||||
import { PlusIcon } from "@phosphor-icons/react";
|
||||
import { PlusIcon, TrophyIcon } from "@phosphor-icons/react";
|
||||
import Sheet from "@/components/sheet/sheet";
|
||||
import TournamentForm from "./tournament-form";
|
||||
import { TournamentCard } from "./tournament-card";
|
||||
import EmptyState from "@/components/empty-state";
|
||||
|
||||
const TournamentCardList = () => {
|
||||
const { data: tournaments } = useTournaments();
|
||||
@@ -27,9 +28,17 @@ const TournamentCardList = () => {
|
||||
</Sheet>
|
||||
</>
|
||||
) : null}
|
||||
{tournaments?.map((tournament: any) => (
|
||||
<TournamentCard key={tournament.id} tournament={tournament} />
|
||||
))}
|
||||
{tournaments && tournaments.length > 0 ? (
|
||||
tournaments.map((tournament: any) => (
|
||||
<TournamentCard key={tournament.id} tournament={tournament} />
|
||||
))
|
||||
) : (
|
||||
<EmptyState
|
||||
icon={<TrophyIcon size={32} />}
|
||||
title="No Tournaments Yet"
|
||||
description="The cups are racked and waiting. Check back soon."
|
||||
/>
|
||||
)}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user