Skip to content

Commit

Permalink
dropped useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
ichim-david committed Aug 19, 2024
1 parent 7257385 commit 7f5c122
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { injectIntl } from 'react-intl';
import { flattenToAppURL, withBlockExtensions } from '@plone/volto/helpers';
import DefaultTemplate from './variations/Default';

Expand All @@ -9,8 +8,7 @@ const ContextNavigationView = (props = {}) => {
const root_path = data?.root_node?.[0]?.['@id'];
if (root_path) navProps['root_path'] = flattenToAppURL(root_path);
const Renderer = variation?.view ?? DefaultTemplate;
delete navProps.variation;
return Renderer ? <Renderer params={navProps} /> : '';
return <Renderer params={navProps} />;
};

export default injectIntl(withBlockExtensions(ContextNavigationView));
export default withBlockExtensions(ContextNavigationView);

0 comments on commit 7f5c122

Please sign in to comment.