File tree Expand file tree Collapse file tree
docusaurus/docs/how-to-guides/ui-extensions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ export const InstanceToolbar = () => {
5050 return (
5151 <div >
5252 { /* Loop through the components added by plugins */ }
53- { components .map (({ id , component : Component } ) => (
54- <Component key = { id } />
53+ { components .map ((Component ) => (
54+ <Component key = { Component . meta . id } />
5555 ))}
5656 </div >
5757 );
@@ -96,8 +96,8 @@ export const InstanceToolbar = ({ instanceId }) => {
9696 return (
9797 <div >
9898 { /* Sharing contextual information using component props */ }
99- { components .map (({ id , component : Component } ) => (
100- <Component key = { id } instanceId = { instanceId } />
99+ { components .map ((Component ) => (
100+ <Component key = { Component . meta . id } instanceId = { instanceId } />
101101 ))}
102102 </div >
103103 );
@@ -138,7 +138,7 @@ export const InstanceToolbar = () => {
138138 // that has registered the extension.
139139 const allowedComponents = useMemo (() => {
140140 const allowedPluginIds = [' myorg-a-app' , ' myorg-b-app' ];
141- return components .filter (({ pluginId } ) => allowedPluginIds .includes (pluginId ));
141+ return components .filter ((Component ) => allowedPluginIds .includes (Component . meta . pluginId ));
142142 }, [components ]);
143143
144144 // ...
You can’t perform that action at this time.
0 commit comments