()
| 196 | |
| 197 | useEffect(() => { |
| 198 | const setHeight = () => { |
| 199 | const vh = window.innerHeight * 0.01; |
| 200 | document.documentElement.style.setProperty("--vh", `${vh}px`); |
| 201 | setVh(`calc(var(--vh, 1vh) * 100)`); |
| 202 | }; |
| 203 | setHeight(); // Set the height at the start |
| 204 | |
| 205 | window.addEventListener("resize", setHeight); |