1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-08 23:15:24 +02:00

fix: don't render chart without width or height

This commit is contained in:
Colton Ehrman 2024-01-14 13:10:53 -06:00
parent 47056203d0
commit ecbd7f427f

View file

@ -49,6 +49,7 @@ export function Chart<TDatum extends Datum>({
// Prevent chart errors from crashing entire UI
<ParentSize>
{({ width, height }) => {
if (!width || !height || width <= 0 || height <= 0) return null
return (
// Set to relative for error boundary overlay
<div className="relative w-full h-full">