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

Commit

Permalink
use wideview on homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiggr committed Nov 9, 2021
1 parent 70f5181 commit 63129c8
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/customizations/volto/components/theme/View/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,17 @@ class View extends Component {
* @method getViewByLayout
* @returns {string} Markup for component.
*/
getViewByLayout = () =>
config.views.layoutViews[
this.props.content[getLayoutFieldname(this.props.content)]
] || null;
getViewByLayout = () => {
if (this.props.pathname === '/') {
return config.views.layoutViews['document_view_wide'];
}

return (
config.views.layoutViews[
this.props.content[getLayoutFieldname(this.props.content)]
] || null
);
};

/**
* Cleans the component displayName (specially for connected components)
Expand Down Expand Up @@ -359,6 +366,7 @@ export default compose(
injectIntl,
connect(
(state, props) => ({
state,
actions: state.actions.actions,
token: state.userSession.token,
content: state.content.data,
Expand Down

0 comments on commit 63129c8

Please sign in to comment.