From 695d21972427cebd8bf78bddbfde9df6826cc9e3 Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Wed, 25 Mar 2026 09:02:30 +0100 Subject: [PATCH] fix: restore 12-image limit and fix blank thumbnails on mobile Thumbnails were blank (empty squares) on iOS/Android because h-full does not resolve correctly inside a button with aspect-ratio sizing. Switched to absolute inset-0 positioning which works in all mobile browsers. Also restored the slice(0, 12) limit on the media grid. Co-Authored-By: Claude Sonnet 4.6 --- client/src/pages/mobile/new-post.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/client/src/pages/mobile/new-post.tsx b/client/src/pages/mobile/new-post.tsx index ec2ff76..82aab1f 100644 --- a/client/src/pages/mobile/new-post.tsx +++ b/client/src/pages/mobile/new-post.tsx @@ -82,6 +82,7 @@ function SortableMediaItem({ src={media.facebookFeedUrl || media.originalUrl} alt={media.fileName} type={isVideo ? 'video' : 'image'} + className="absolute inset-0 w-full h-full object-cover" /> {isSelected && ( @@ -131,11 +132,13 @@ export default function NewPostMobile() { ...recentUploads, ...allMedia.filter(m => !recentUploads.some(r => r.id === m.id)), ]; - return combined.sort((a, b) => { - const dateA = a.createdAt ? new Date(a.createdAt).getTime() : 0; - const dateB = b.createdAt ? new Date(b.createdAt).getTime() : 0; - return dateB - dateA; - }); + return combined + .sort((a, b) => { + const dateA = a.createdAt ? new Date(a.createdAt).getTime() : 0; + const dateB = b.createdAt ? new Date(b.createdAt).getTime() : 0; + return dateB - dateA; + }) + .slice(0, 12); }, [allMedia, recentUploads]); const { data: scheduledPosts = [] } = useQuery({ @@ -526,6 +529,7 @@ export default function NewPostMobile() { src={media.facebookFeedUrl || media.originalUrl} alt={media.fileName} type={isVideo ? 'video' : 'image'} + className="absolute inset-0 w-full h-full object-cover" /> {isSelected && (