diff --git a/src/components/frontend/helpdesk/TicketsView.tsx b/src/components/frontend/helpdesk/TicketsView.tsx
index 9572937..6b495aa 100644
--- a/src/components/frontend/helpdesk/TicketsView.tsx
+++ b/src/components/frontend/helpdesk/TicketsView.tsx
@@ -13,12 +13,13 @@ import { CLOSING_STATUSES, STATUS_STYLES, type TicketStatus } from "@/lib/ticket
import { InboxIcon, PlusIcon, SearchIcon } from "lucide-react";
import { cn } from "@/lib/utils";
import { usePageCommands } from "@/components/command-palette/CommandPaletteContext";
+import type { TicketVoteSummary } from "@/lib/tickets/voteState";
type TicketFilter = "all" | "open" | "resolved" | "closed" | "unassigned";
interface TicketsViewProps {
readonly tickets: readonly Ticket[];
- readonly currentUserId: number;
+ readonly voteSummaries: readonly TicketVoteSummary[];
readonly isStaff: boolean;
}
@@ -54,10 +55,14 @@ function isUnassignedTicket(ticket: Ticket): boolean {
);
}
-export function TicketsView({ tickets, currentUserId: _currentUserId, isStaff }: TicketsViewProps) {
+export function TicketsView({ tickets, voteSummaries, isStaff }: TicketsViewProps) {
const [activeFilter, setActiveFilter] = useState
("all");
const [search, setSearch] = useState("");
const [createOpen, setCreateOpen] = useState(false);
+ const votesByTicket = useMemo(
+ () => new Map(voteSummaries.map((summary) => [summary.ticketId, summary])),
+ [voteSummaries],
+ );
usePageCommands([
{
@@ -200,7 +205,17 @@ export function TicketsView({ tickets, currentUserId: _currentUserId, isStaff }:
) : (
{filteredTickets.map((ticket) => (
-
+
))}
)}