From b5123931eb5db1973243e936aaee1d97bd904cf0 Mon Sep 17 00:00:00 2001 From: Michael Hudson Nkotagu Date: Thu, 21 Nov 2024 19:23:32 +0300 Subject: [PATCH 01/11] fix: Restrict the display of Stories heading and list of stories when there is more than one story --- apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.js b/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.js index d4240a66a..fe6218709 100644 --- a/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.js +++ b/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.js @@ -30,6 +30,7 @@ const ArticleGrid = React.forwardRef(function ArticleGrid(props, ref) { sx={{ order: { xs: 0, md: 1 }, width: "100%", + display: articles?.length > 1 ? "block" : "none", }} > {/* title is below featuredArticle in md and above hence needs margin-top */} @@ -71,7 +72,7 @@ const ArticleGrid = React.forwardRef(function ArticleGrid(props, ref) { /> ) : null} - {articles?.length > 0 ? ( + {articles?.length > 1 ? ( Date: Thu, 21 Nov 2024 19:24:32 +0300 Subject: [PATCH 02/11] chore: Update ArticleGrid and Articles snapshots --- .../ArticleGrid/ArticleGrid.snap.js | 2 +- .../src/components/Articles/Articles.snap.js | 45 +------------------ 2 files changed, 2 insertions(+), 45 deletions(-) diff --git a/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.snap.js b/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.snap.js index e49f8ec98..5dcaab527 100644 --- a/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.snap.js +++ b/apps/civicsignalblog/src/components/ArticleGrid/ArticleGrid.snap.js @@ -9,7 +9,7 @@ exports[` renders unchanged 1`] = ` class="MuiGrid-root MuiGrid-container css-teoma9-MuiGrid-root" >
renders unchanged 1`] = ` class="MuiGrid-root MuiGrid-container css-teoma9-MuiGrid-root" >
renders unchanged 1`] = `
-