Skip to content

Commit

Permalink
Render featured story
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinkipruto committed Sep 25, 2023
1 parent 6833ce8 commit c528442
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions apps/codeforafrica/src/components/ArticleGrid/ArticleGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,30 @@ const ArticleGrid = React.forwardRef(function ArticleGrid(props, ref) {
}}
/>
</Grid>
{articles?.length > 0 ? (
<>
{featuredArticle ? (
<Grid
item
xs={12}
sx={{ order: { xs: 1, md: 0 } }}
key={featuredArticle.id}
>
<FeaturedArticle
{...featuredArticle}
readMoreLabel={readMoreLabel}
/>
</Grid>
) : null}

<>
{featuredArticle ? (
<Grid
item
xs={12}
sx={{ order: { xs: 1, md: 0 } }}
key={featuredArticle.id}
>
<FeaturedArticle
{...featuredArticle}
readMoreLabel={readMoreLabel}
/>
</Grid>
) : null}
{articles?.length > 0 ? (
<Grid item xs={12} sx={{ order: { xs: 2 } }}>
<ArticleCardList
sx={{ pt: { xs: "28px", md: 0 } }}
articles={articles}
/>
</Grid>
</>
) : null}
) : null}
</>
</Grid>
</Section>
);
Expand Down

0 comments on commit c528442

Please sign in to comment.