From 4374b1c77724c0faee4c3168ab1a7a33038ea91a Mon Sep 17 00:00:00 2001 From: codex-bot Date: Thu, 23 Oct 2025 10:05:14 -0300 Subject: [PATCH] fix(new-ticket-dialog): place allowTicketMentions inside component to satisfy TS and restore build --- src/components/tickets/new-ticket-dialog.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/tickets/new-ticket-dialog.tsx b/src/components/tickets/new-ticket-dialog.tsx index c6f76bd..2abe4cf 100644 --- a/src/components/tickets/new-ticket-dialog.tsx +++ b/src/components/tickets/new-ticket-dialog.tsx @@ -92,6 +92,10 @@ export function NewTicketDialog({ triggerClassName }: { triggerClassName?: strin const selectTriggerClass = "flex h-8 w-full items-center justify-between rounded-full border border-slate-300 bg-white px-3 text-sm font-medium text-neutral-800 shadow-sm focus:ring-0 data-[state=open]:border-[#00d6eb]" const selectItemClass = "flex items-center gap-2 rounded-md px-2 py-2 text-sm text-neutral-800 transition data-[state=checked]:bg-[#00e8ff]/15 data-[state=checked]:text-neutral-900 focus:bg-[#00e8ff]/10" const [assigneeInitialized, setAssigneeInitialized] = useState(false) + const allowTicketMentions = useMemo(() => { + const normalized = (role ?? "").toLowerCase() + return normalized === "admin" || normalized === "agent" || normalized === "collaborator" + }, [role]) useEffect(() => { if (!open) { @@ -441,7 +445,3 @@ export function NewTicketDialog({ triggerClassName }: { triggerClassName?: strin ) } - const allowTicketMentions = useMemo(() => { - const normalized = (role ?? "").toLowerCase() - return normalized === "admin" || normalized === "agent" || normalized === "collaborator" - }, [role])