💩 add ts-expect-error to Victory components

This commit is contained in:
gozineb 2023-06-15 11:07:16 +02:00
parent 3676ee7be3
commit b40da1376f
2 changed files with 20 additions and 14 deletions

View File

@ -17,20 +17,23 @@ const BrainSpaceChart = ({
...props
}: BrainSpaceChartProps): JSX.Element => {
return (
<VictoryPie
data={[
{ x: "Used", y: current_brain_size },
{ x: "Unused", y: max_brain_size - current_brain_size },
]}
containerComponent={
<VictoryContainer
className="bg-white rounded-md w-full h-full"
responsive={true}
/>
}
{...props}
theme={VictoryTheme.material}
/>
<>
{/* @ts-expect-error Server Component */}
<VictoryPie
data={[
{ x: "Used", y: current_brain_size },
{ x: "Unused", y: max_brain_size - current_brain_size },
]}
containerComponent={
<VictoryContainer
className="bg-white rounded-md w-full h-full"
responsive={true}
/>
}
{...props}
theme={VictoryTheme.material}
/>
</>
);
};

View File

@ -51,12 +51,15 @@ export const RequestsPerDayChart = ({
}}
{...props}
>
{/* @ts-expect-error Server Component */}
<VictoryAxis
tickFormat={(tick) => {
return `${tick.split("/")[0]}/${tick.split("/")[1]}`;
}}
/>
{/* @ts-expect-error Server Component */}
<VictoryAxis dependentAxis />
{/* @ts-expect-error Server Component */}
<VictoryLine data={data} x="date" y="requests_count" />
</VictoryChart>
);