diff --git a/app/client/src/pages/AppViewer/index.tsx b/app/client/src/pages/AppViewer/index.tsx index 8bbdb93e55..5f9a2aa5ae 100644 --- a/app/client/src/pages/AppViewer/index.tsx +++ b/app/client/src/pages/AppViewer/index.tsx @@ -43,16 +43,19 @@ import AppViewerCommentsSidebar from "./AppViewerComemntsSidebar"; const SentryRoute = Sentry.withSentryRouting(Route); -const AppViewerBody = styled.section<{ hasPages: boolean }>` +const AppViewerBody = styled.section<{ hasPages: boolean; isEmbeded: boolean }>` display: flex; flex-direction: row; align-items: stretch; justify-content: flex-start; - height: calc( - 100vh - - ${(props) => - !props.hasPages ? `${props.theme.smallHeaderHeight} - 1px` : "72px"} - ); + ${(props) => + props.isEmbeded + ? // embeded page will not have top header + "height: 100vh" + : `height: calc( + 100vh - + ${!props.hasPages ? `${props.theme.smallHeaderHeight} - 1px` : "72px"} + );`} `; const ContainerWithComments = styled.div` @@ -149,7 +152,8 @@ class AppViewer extends Component { }; public render() { - const { isInitialized } = this.props; + const { isInitialized, location } = this.props; + const isEmbeded = location.search.indexOf("embed=true") !== -1; return ( @@ -164,7 +168,10 @@ class AppViewer extends Component { - 1}> + 1} + isEmbeded={isEmbeded} + > {isInitialized && this.state.registered && (