fixes: rendering of components in viewer for mobile (#7759)

This commit is contained in:
Arpit 2023-10-11 13:36:44 +05:30 committed by GitHub
parent 277e616180
commit 1fe3c608b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,7 +115,7 @@ class ViewerComponent extends React.Component {
let mobileLayoutHasWidgets = false;
if (this.props.currentLayout === 'mobile') {
const currentComponents = data.definition.pages[data.definition.homePageId].components;
const currentComponents = appDefData.pages[appDefData.homePageId].components;
mobileLayoutHasWidgets =
Object.keys(currentComponents).filter((componentId) => currentComponents[componentId]['layouts']['mobile'])
.length > 0;