From 7987de279023cf07cecb3a7acfdc4ff967fec3ba Mon Sep 17 00:00:00 2001 From: Haroon Date: Sun, 24 May 2026 12:01:19 +0530 Subject: [PATCH 1/3] fix: hide reading time on mobile and prevent category overlap --- .../src/components/ContentCard.tsx | 16 +++++++++++----- .../src/components/ContentRenderer.tsx | 16 ++++++++++++---- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/packages/blog-kit-react/src/components/ContentCard.tsx b/packages/blog-kit-react/src/components/ContentCard.tsx index 6292947..b9ef601 100644 --- a/packages/blog-kit-react/src/components/ContentCard.tsx +++ b/packages/blog-kit-react/src/components/ContentCard.tsx @@ -25,13 +25,15 @@ export function ContentCard({ const defaultLink = (href: string, children: React.ReactNode) => {children}; const Link = renderLink || defaultLink; + const hasVisibleOnMobile = (showCategory && metadata.categories?.length) || showDate; + return (
{(showCategory || showReadingTime || showDate) && ( -
-
+
+
{showCategory && metadata.categories?.length ? (
{metadata.categories.slice(0, 2).map((cat) => ( @@ -40,9 +42,13 @@ export function ContentCard({
) : null} {(showReadingTime || showDate) && ( -
- {showReadingTime && {metadata.readingTime}} - {showReadingTime && showDate && •} +
+ {showReadingTime && ( + {metadata.readingTime} + )} + {showReadingTime && showDate && •} {showDate && (