Fix plugin launchers initialization by adding enabled flag based on companyId
This commit is contained in:
parent
ec261e9c7c
commit
0d2380b7b1
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ type GlobalToolbarContext = { companyId: string | null; companyPrefix: string |
|
||||||
|
|
||||||
function GlobalToolbarPlugins({ context }: { context: GlobalToolbarContext }) {
|
function GlobalToolbarPlugins({ context }: { context: GlobalToolbarContext }) {
|
||||||
const { slots } = usePluginSlots({ slotTypes: ["globalToolbarButton"], companyId: context.companyId });
|
const { slots } = usePluginSlots({ slotTypes: ["globalToolbarButton"], companyId: context.companyId });
|
||||||
const { launchers } = usePluginLaunchers({ placementZones: ["globalToolbarButton"], companyId: context.companyId });
|
const { launchers } = usePluginLaunchers({ placementZones: ["globalToolbarButton"], companyId: context.companyId, enabled: !!context.companyId });
|
||||||
if (slots.length === 0 && launchers.length === 0) return null;
|
if (slots.length === 0 && launchers.length === 0) return null;
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center gap-1 ml-auto shrink-0 pl-2">
|
<div className="flex items-center gap-1 ml-auto shrink-0 pl-2">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue