Make sized container have default height so graph doesn't jump
This commit is contained in:
parent
5d7721e041
commit
935bdd12a7
|
@ -29,7 +29,14 @@ export const SizedContainer = (props: {
|
||||||
}, [threshold, fullHeight, mobileHeight])
|
}, [threshold, fullHeight, mobileHeight])
|
||||||
return (
|
return (
|
||||||
<div ref={containerRef}>
|
<div ref={containerRef}>
|
||||||
{width != null && height != null && children(width, height)}
|
{width != null && height != null ? (
|
||||||
|
children(width, height)
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<div className="sm:hidden" style={{ height: mobileHeight }} />
|
||||||
|
<div className="hidden sm:flex" style={{ height: fullHeight }} />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user