Skip to content

Commit

Permalink
Merge pull request #22 from chimobi-justice/fix/card-mobile
Browse files Browse the repository at this point in the history
Fix: card mobile
  • Loading branch information
chimobi-justice authored Sep 28, 2024
2 parents caed546 + 0a4b46b commit bad570b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/components/ArticleCard/LatestArticle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ const LatestArticleCard: FunctionComponent<IProps> = ({
CTAText
}) => {
return (
<Card>
<Card maxW={"md"}>
<CardBody>
<Box>
<Image
src={articleImage}
alt='Green double couch with wooden legs'
alt={title}
borderRadius='lg'
width={"100%"}
height={"200px"}
objectFit={"cover"}
/>
</Box>
<Stack mt='6' spacing='3'>
<Stack mt='6' spacing={2}>
<Text fontSize={"14px"} color={"#0009"}>{date}</Text>
<Heading
as="h4"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Articles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Articles: FunctionComponent = () => {
)}
</Box>

<SimpleGrid minChildWidth="370px" spacing={4}>
<SimpleGrid minChildWidth="350px" spacing={3}>
{pinArticles?.map((article: any, index: number) => (
<LatestArticleCard
key={index}
Expand Down
7 changes: 3 additions & 4 deletions src/pages/Home/Public/Articles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ const HomeArticles: FunctionComponent = () => {
Lat<Text as="span" color={colors.primary}>est</Text> Ar<Text as="span" color={colors.primary}>tic</Text>les
</Heading>

{isLoading && <Skeleton />}

{articles && isSuccess && (
<>
<SimpleGrid minChildWidth="370px" spacing={4}>
<SimpleGrid minChildWidth="350px" spacing={3}>
{articles?.map((article: any, index: any) => (
<LatestArticleCard
key={index}
Expand Down Expand Up @@ -51,9 +53,6 @@ const HomeArticles: FunctionComponent = () => {
</Box>
</>
)}

{isLoading && <Skeleton />}

</Box>
)
}
Expand Down

0 comments on commit bad570b

Please sign in to comment.