Skip to content

Commit

Permalink
fix(validatore): fix footer position v2
Browse files Browse the repository at this point in the history
  • Loading branch information
VincenzoDeSisto committed Sep 6, 2024
1 parent 1beff0b commit 4a5b593
Showing 1 changed file with 2 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ const ValidatoreResult = () => {

const buttonGroupErrorEl = document.getElementById("button-group-error");
const backgroundEl = document.getElementById("background-custom");
const pageFrontEl = document.getElementById("page-front");
const spaceEl = document.getElementById("space");

const errorRef = useRef(null);
const warningRef = useRef(null);
Expand Down Expand Up @@ -84,12 +82,6 @@ const ValidatoreResult = () => {
offset - (isMobile() ? 0 : 80)
}px, white 0)`;
};
const handleChangeSpace = () => {
const offset = pageFrontEl.clientHeight;
spaceEl.style.height = `calc(${window.screen.height}px - ${
offset - 110
}px)`;
};

// to calculate the background (light-blue) height
useEffect(() => {
Expand All @@ -102,24 +94,9 @@ const ValidatoreResult = () => {

return () => {
window.removeEventListener("resize", handleChangeBackground);
window.removeEventListener("resize", handleChangeSpace);
};
}, [buttonGroupErrorEl, response, backgroundEl]);

//to separate div between <main> and <footer>
useEffect(() => {
if (pageFrontEl && spaceEl) {
handleChangeSpace();
window.addEventListener("resize", handleChangeSpace);

if (!stoplight) setStoplight(true);
}

return () => {
window.removeEventListener("resize", handleChangeSpace);
};
}, [pageFrontEl, spaceEl, stoplight]);

useEffect(() => {
setStoplight(true);
if (backgroundEl)
Expand Down Expand Up @@ -165,14 +142,14 @@ const ValidatoreResult = () => {
</div>
</div> */}

<div className="col-12 mt-4 mb-5 d-flex">
<div className="col-12 my-5 d-flex">
<svg
className="icon icon-xl me-3 mt-3"
fill="green"
>
<use href={sprite + "#it-check-circle"}></use>
</svg>
<h1 className="main col-6">
<h1 className="main col-6 col-md-8">
Complimenti, il tuo file risulta essere idoneo
</h1>
</div>
Expand All @@ -190,15 +167,6 @@ const ValidatoreResult = () => {
</div>
</div>
</div>
<div
id="space"
style={{
width: "100%",
height: "200px",
display: "block",
backgroundColor: "rgb(240, 246, 252)"
}}
></div>
</div>
) : response &&
(response.errors.length !== 0 || response.warnings.length !== 0) ? (
Expand Down

0 comments on commit 4a5b593

Please sign in to comment.