};
renderAdminExtensions() {
+ if (this.props.branch && !this.props.branch.isMain) {
+ return [];
+ }
const extensions = this.getConfiguration().extensions || [];
return extensions.map(e => this.renderExtension(e, true));
}
renderExtensions() {
const extensions = this.props.component.extensions || [];
- if (!extensions.length) {
+ if (!extensions.length || (this.props.branch && !this.props.branch.isMain)) {
return null;
}
name: 'feature',
type: BranchType.SHORT
};
- const component = { ...baseComponent, configuration: { showSettings: true } };
+ const component = {
+ ...baseComponent,
+ configuration: { showSettings: true },
+ extensions: [{ key: 'component-foo', name: 'ComponentFoo' }]
+ };
expect(
shallow(<ComponentNavMenu branch={branch} component={component} />, {
context: { branchesEnabled: true }
shallow(
<ComponentNavMenu
branch={branch}
- component={{ ...baseComponent, configuration: { showSettings } }}
+ component={{
+ ...baseComponent,
+ configuration: { showSettings },
+ extensions: [{ key: 'component-foo', name: 'ComponentFoo' }]
+ }}
/>,
{ context: { branchesEnabled: true } }
)