Wire quick actions to reopen admin modals in-place
This commit is contained in:
parent
8db3b20a40
commit
6a75a0a9ed
4 changed files with 47 additions and 2 deletions
|
|
@ -436,6 +436,15 @@ export function AdminCompaniesManager({ initialCompanies, tenantId, autoOpenCrea
|
|||
}
|
||||
}, [autoOpenCreate, openCreate])
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof window === "undefined") return
|
||||
const handler = () => {
|
||||
openCreate()
|
||||
}
|
||||
window.addEventListener("quick-open-company", handler)
|
||||
return () => window.removeEventListener("quick-open-company", handler)
|
||||
}, [openCreate])
|
||||
|
||||
const handleDelete = useCallback(async () => {
|
||||
if (!isDeleting) return
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue