From b03396e175ed82181ce2af96788a94bcde5d2e9e Mon Sep 17 00:00:00 2001 From: Carlos Cano Date: Fri, 15 Nov 2024 15:11:05 +0100 Subject: [PATCH] Also fix the mobile view of the bottom cards --- .../DashboardInnovationPacks/InnovationPacksView.tsx | 7 +++++-- .../LibraryTemplatesView.tsx | 11 +++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/domain/InnovationPack/DashboardInnovationPacks/InnovationPacksView.tsx b/src/domain/InnovationPack/DashboardInnovationPacks/InnovationPacksView.tsx index b972b0ae94..77f8be28a8 100644 --- a/src/domain/InnovationPack/DashboardInnovationPacks/InnovationPacksView.tsx +++ b/src/domain/InnovationPack/DashboardInnovationPacks/InnovationPacksView.tsx @@ -11,6 +11,8 @@ import { Box, Button, Theme, useMediaQuery } from '@mui/material'; import { CONTRIBUTE_CARD_COLUMNS } from '../../../core/ui/card/ContributeCard'; import GridItem from '../../../core/ui/grid/GridItem'; import { Skeleton } from '@mui/material'; +import { gutters } from '../../../core/ui/grid/utils'; +import { useTheme } from '@mui/styles'; interface InnovationPacksViewProps extends PageContentBlockProps { filter: string[]; @@ -37,6 +39,7 @@ const InnovationPacksView = ({ ...props }: InnovationPacksViewProps) => { const { t } = useTranslation(); + const theme = useTheme(); const isMobile = useMediaQuery(theme => theme.breakpoints.down('sm')); return ( @@ -54,8 +57,8 @@ const InnovationPacksView = ({ ? Array.from({ length: isMobile ? 2 : 5 }).map((_, idx) => ( & LibraryTemplatesViewProps) => { const { t } = useTranslation(); const isMobile = useMediaQuery(theme => theme.breakpoints.down('sm')); + const theme = useTheme(); return ( @@ -90,11 +93,11 @@ const LibraryTemplatesView = ({ {loading - ? Array.from({ length: 5 }).map((_, idx) => ( + ? Array.from({ length: isMobile ? 2 : 5 }).map((_, idx) => ( ))} - {isMobile && hasMore && ( + {isMobile && !loading && hasMore && (