mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
fix: replace return null with empty tags
This commit is contained in:
@@ -73,7 +73,7 @@ const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
|
||||
)
|
||||
|
||||
if (!colorConfig.length) {
|
||||
return null
|
||||
return <></>;
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -135,7 +135,7 @@ const ChartTooltipContent = React.forwardRef<
|
||||
|
||||
const tooltipLabel = React.useMemo(() => {
|
||||
if (hideLabel || !payload?.length) {
|
||||
return null
|
||||
return <></>;
|
||||
}
|
||||
|
||||
const [item] = payload
|
||||
@@ -155,7 +155,7 @@ const ChartTooltipContent = React.forwardRef<
|
||||
}
|
||||
|
||||
if (!value) {
|
||||
return null
|
||||
return <></>;
|
||||
}
|
||||
|
||||
return <div className={cn("font-medium", labelClassName)}>{value}</div>
|
||||
@@ -170,7 +170,7 @@ const ChartTooltipContent = React.forwardRef<
|
||||
])
|
||||
|
||||
if (!active || !payload?.length) {
|
||||
return null
|
||||
return <></>;
|
||||
}
|
||||
|
||||
const nestLabel = payload.length === 1 && indicator !== "dot"
|
||||
@@ -273,7 +273,7 @@ const ChartLegendContent = React.forwardRef<
|
||||
const { config } = useChart()
|
||||
|
||||
if (!payload?.length) {
|
||||
return null
|
||||
return <></>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user