"use client"; import { useEffect, useState } from "react"; import { Badge } from "@/components/ui/badge"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table"; interface QueueAsset { id: string; fileName: string; platform?: string | null; status: string; postizPostId?: string | null; metadata?: string | null; createdAt: string; campaign?: { name: string }; } export default function QueuePage() { const [assets, setAssets] = useState([]); useEffect(() => { fetch("/api/assets?status=published") .then((r) => r.json()) .then(setAssets) .catch(() => {}); }, []); return (

Publishing Queue

Scheduled & Published Assets pushed to Postiz for publishing {assets.length === 0 ? (

No published assets yet. Approve assets and push them to Postiz.

) : ( Asset Campaign Platform Status Post ID {assets.map((asset) => { const metadata = asset.metadata ? JSON.parse(asset.metadata) : {}; return ( {asset.fileName} {metadata.caption && (

{metadata.caption}

)}
{asset.campaign?.name || "—"} {asset.platform && ( {asset.platform} )} {asset.status} {asset.postizPostId || "—"}
); })}
)}
); }