Web: Client: fix layout height

This commit is contained in:
Viktor Fomin 2022-05-31 14:43:43 +03:00
parent db2308128d
commit f1225ed3f6

View File

@ -116,8 +116,12 @@ const Layout = (props) => {
// height = window.screen.availHeight - correctorTabletSafari;
// }
// }
const isSmartBanner =
document.getElementsByClassName("smartbanner-container")[0].nodeName ===
"DIV";
const bannerHeight = isSmartBanner ? 80 : 0;
let vh = (height - 48) * 0.01;
let vh = (height - 48 - bannerHeight) * 0.01;
document.documentElement.style.setProperty("--vh", `${vh}px`);
setContentHeight(height);