Fix container bottom margin setting on load
Ensure page container bottom margin is set correctly when cookie notice appears
This commit is contained in:
@@ -106,10 +106,11 @@ class App extends React.Component {
|
|||||||
this.cookies = new Cookies();
|
this.cookies = new Cookies();
|
||||||
this.cookieNotice = document.getElementById("cookie-notice");
|
this.cookieNotice = document.getElementById("cookie-notice");
|
||||||
this.root = document.getElementById("root");
|
this.root = document.getElementById("root");
|
||||||
this.cookieNoticeHeight = this.cookieNotice.offsetHeight;
|
this.cookieNoticeHeight = 0;
|
||||||
|
|
||||||
if (this.cookies.get("parandum-cookies-accepted") !== "true") {
|
if (this.cookies.get("parandum-cookies-accepted") !== "true") {
|
||||||
this.cookieNotice.style.display = "flex";
|
this.cookieNotice.style.display = "flex";
|
||||||
|
this.cookieNoticeHeight = this.cookieNotice.offsetHeight;
|
||||||
this.cookieNotice.animate({
|
this.cookieNotice.animate({
|
||||||
bottom: [`-${this.cookieNoticeHeight}px`, "0px"],
|
bottom: [`-${this.cookieNoticeHeight}px`, "0px"],
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
Reference in New Issue
Block a user