From 6ef47fc432b781e635982bc3d00a0b6eb8a5114d Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Tue, 29 Jul 2025 14:59:23 -0700 Subject: [PATCH] show button only if necessary --- .../features/space/components/space-grid.tsx | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/apps/client/src/features/space/components/space-grid.tsx b/apps/client/src/features/space/components/space-grid.tsx index 6f16582e..190de857 100644 --- a/apps/client/src/features/space/components/space-grid.tsx +++ b/apps/client/src/features/space/components/space-grid.tsx @@ -13,9 +13,9 @@ import { IconArrowRight } from "@tabler/icons-react"; export default function SpaceGrid() { const { t } = useTranslation(); - const { data, isLoading } = useGetSpacesQuery({ page: 1, limit: 9 }); + const { data, isLoading } = useGetSpacesQuery({ page: 1, limit: 10 }); - const cards = data?.items.map((space, index) => ( + const cards = data?.items.slice(0, 9).map((space, index) => ( {cards} - - - + {data?.items && data.items.length > 9 && ( + + + + )} ); }