mirror of
https://github.com/plausible/analytics.git
synced 2024-11-27 09:16:25 +03:00
Make sure initial load re-evaluates viewport width (#4214)
This commit is contained in:
parent
f6360b8241
commit
56a9a1c72d
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user