Make sure initial load re-evaluates viewport width (#4214)

This commit is contained in:
RobertJoonas 2024-06-11 11:28:59 +01:00 committed by GitHub
parent f6360b8241
commit 56a9a1c72d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -127,6 +127,8 @@ function Filters(props) {
const [viewport, setViewport] = useState(1080) const [viewport, setViewport] = useState(1080)
useEffect(() => { useEffect(() => {
handleResize()
window.addEventListener('resize', handleResize, false) window.addEventListener('resize', handleResize, false)
document.addEventListener('keyup', handleKeyup) document.addEventListener('keyup', handleKeyup)