From 38a5d644f8fa55f609a287f976ce3ef291f47ec3 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Mon, 17 Nov 2025 15:02:43 +0000 Subject: [PATCH] Add ability to preview Facebook stories alongside Instagram Refactor `renderInstagramStory` to a generic `renderStory` function that accepts a platform type, and add support for rendering Facebook stories. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Event-Id: ee00a69b-0c5c-4d62-821b-8151fe745045 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/5aomXd9 --- client/src/components/preview-modal.tsx | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/client/src/components/preview-modal.tsx b/client/src/components/preview-modal.tsx index b0d34e3..ffd6278 100644 --- a/client/src/components/preview-modal.tsx +++ b/client/src/components/preview-modal.tsx @@ -293,7 +293,7 @@ export function PreviewModal({ return { fontSize, lines, isTruncated }; }; - const renderInstagramStory = () => { + const renderStory = (platform: 'facebook' | 'instagram') => { const STORY_WIDTH = 360; const STORY_HEIGHT = 640; const TEXT_BOX_HEIGHT_RATIO = 0.25; @@ -311,9 +311,15 @@ export function PreviewModal({
{/* Header */}
-
- -
+ {platform === 'instagram' ? ( +
+ +
+ ) : ( +
+ +
+ )}
votre_page
@@ -381,6 +387,9 @@ export function PreviewModal({ ); }; + const renderFacebookStory = () => renderStory('facebook'); + const renderInstagramStory = () => renderStory('instagram'); + return ( @@ -406,6 +415,9 @@ export function PreviewModal({ Feed Facebook (1200x630) + + Story Facebook (1080x1920) + Feed Instagram (1080x1080) @@ -419,6 +431,7 @@ export function PreviewModal({ {/* Preview */}
{previewFormat === 'facebook-feed' && renderFacebookFeed()} + {previewFormat === 'facebook-story' && renderFacebookStory()} {previewFormat === 'instagram-feed' && renderInstagramFeed()} {previewFormat === 'instagram-story' && renderInstagramStory()}