fix(new-ticket-dialog): place allowTicketMentions inside component to satisfy TS and restore build
This commit is contained in:
parent
904134604c
commit
4374b1c777
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
|||
</Dialog>
|
||||
)
|
||||
}
|
||||
const allowTicketMentions = useMemo(() => {
|
||||
const normalized = (role ?? "").toLowerCase()
|
||||
return normalized === "admin" || normalized === "agent" || normalized === "collaborator"
|
||||
}, [role])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue