From f1b3628ac0d4eb4a0bd02b4f1bbc4f7f96d0218b Mon Sep 17 00:00:00 2001 From: R0m1k3 Date: Tue, 10 Feb 2026 14:38:27 +0100 Subject: [PATCH] fix(ui): correct reel labeling in history and dashboard --- client/src/components/recent-publications.tsx | 28 ++++++++++--------- client/src/pages/history.tsx | 19 +++++++------ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/client/src/components/recent-publications.tsx b/client/src/components/recent-publications.tsx index 30362be..c9dec0f 100644 --- a/client/src/components/recent-publications.tsx +++ b/client/src/components/recent-publications.tsx @@ -1,6 +1,6 @@ import { useQuery } from "@tanstack/react-query"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; -import { Facebook, Instagram, Clock, CheckCircle2, XCircle, Eye, Image as ImageIcon, Smartphone } from "lucide-react"; +import { Facebook, Instagram, Clock, CheckCircle2, XCircle, Eye, Image as ImageIcon, Smartphone, Clapperboard } from "lucide-react"; import { format } from "date-fns"; import { fr } from "date-fns/locale"; import type { ScheduledPost, SocialPage, Post, Media } from "@shared/schema"; @@ -35,21 +35,21 @@ export default function RecentPublications() { const response = await fetch(`/api/posts/${scheduledPost.postId}`, { credentials: "include", }); - + if (!response.ok) { throw new Error("Failed to fetch post"); } - + const postWithMedia = await response.json(); const mediaIds = postWithMedia.media?.map((m: Media) => m.id) || []; const allMedia = postWithMedia.media || []; - + setPreviewData({ postText: postWithMedia.post.content || '', mediaIds: mediaIds, allMedia: allMedia, }); - + setPreviewModalOpen(true); } catch (error) { toast({ @@ -65,6 +65,8 @@ export default function RecentPublications() { return ; } else if (postType === 'story') { return ; + } else if (postType === 'reel') { + return ; } else if (postType === 'both') { return (
@@ -105,11 +107,10 @@ export default function RecentPublications() { data-testid={`publication-${scheduledPost.id}`} > {/* Platform icon */} -
+ }`}> {scheduledPost.page?.platform === 'facebook' ? ( ) : ( @@ -150,12 +151,13 @@ export default function RecentPublications() { )}
- +
{getPostTypeIcon(scheduledPost.postType)} - {scheduledPost.postType === 'feed' ? 'Feed' : - scheduledPost.postType === 'story' ? 'Story' : 'Feed & Story'} + {scheduledPost.postType === 'feed' ? 'Feed' : + scheduledPost.postType === 'story' ? 'Story' : + scheduledPost.postType === 'reel' ? 'Reel' : 'Feed & Story'} • @@ -181,7 +183,7 @@ export default function RecentPublications() { postText={previewData.postText} selectedMedia={previewData.mediaIds} mediaList={previewData.allMedia} - onPublish={() => {}} + onPublish={() => { }} isPublishing={false} readOnly={true} /> diff --git a/client/src/pages/history.tsx b/client/src/pages/history.tsx index c5e73a5..2bba9e4 100644 --- a/client/src/pages/history.tsx +++ b/client/src/pages/history.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { useQuery } from "@tanstack/react-query"; -import { Clock, CheckCircle, XCircle, Calendar, History as HistoryIcon, Eye, Image as ImageIcon, Smartphone, Loader2 } from "lucide-react"; +import { Clock, CheckCircle, XCircle, Calendar, History as HistoryIcon, Eye, Image as ImageIcon, Smartphone, Loader2, Clapperboard } from "lucide-react"; import Sidebar from "@/components/sidebar"; import TopBar from "@/components/topbar"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; @@ -69,6 +69,8 @@ export default function History() { return ; } else if (postType === 'story') { return ; + } else if (postType === 'reel') { + return ; } else if (postType === 'both') { return (
@@ -138,8 +140,8 @@ export default function History() {
{hasError ? ( @@ -170,10 +172,10 @@ export default function History() { {hasError ? ( @@ -202,7 +204,8 @@ export default function History() { {getPostTypeIcon(scheduledPost.postType)} {scheduledPost.postType === 'feed' ? 'Feed' : - scheduledPost.postType === 'story' ? 'Story' : 'Feed & Story'} + scheduledPost.postType === 'story' ? 'Story' : + scheduledPost.postType === 'reel' ? 'Reel' : 'Feed & Story'}