Fix ReportsQueue build errors

This commit is contained in:
gpt-engineer-app[bot]
2025-10-10 17:07:59 +00:00
parent 83ccc51f61
commit 592a2ea9e9

View File

@@ -348,6 +348,11 @@ export const ReportsQueue = forwardRef<ReportsQueueRef>((props, ref) => {
); );
} }
// Apply client-side sorting
const sortedReports = useMemo(() => {
return sortReports(reports, sortConfig);
}, [reports, sortConfig]);
return ( return (
<div className="space-y-6"> <div className="space-y-6">
{/* New Reports Notification */} {/* New Reports Notification */}
@@ -419,10 +424,8 @@ export const ReportsQueue = forwardRef<ReportsQueueRef>((props, ref) => {
)} )}
</div> </div>
{/* Apply sorting before rendering */} {/* Report Cards */}
{useMemo(() => { {sortedReports.map((report) => (
const sortedReports = sortReports(reports, sortConfig);
return sortedReports.map((report) => (
<Card key={report.id} className="border-l-4 border-l-red-500"> <Card key={report.id} className="border-l-4 border-l-red-500">
<CardHeader className="pb-4"> <CardHeader className="pb-4">
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">