Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
cleaned viewClass
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiggr committed Mar 3, 2022
1 parent ff780d8 commit 56d110f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/customizations/volto/components/theme/View/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,17 +294,15 @@ class View extends Component {
const RenderedView =
this.getViewByType() || this.getViewByLayout() || this.getViewDefault();

const cleanedViewClass = RenderedView.displayName
? `view-${this.cleanViewName(RenderedView.displayName)}`
: null;

return (
<div id="view">
<ContentMetadataTags content={this.props.content} />
{/* Body class if displayName in component is set */}
<BodyClass
className={
RenderedView.displayName
? `view-${this.cleanViewName(RenderedView.displayName)}`
: null
}
/>
<BodyClass className={cleanedViewClass} />
{this.props.loading && (
<Dimmer active inverted>
<Loader size="massive" />
Expand Down

0 comments on commit 56d110f

Please sign in to comment.