diff --git a/components/WBGraph.tsx b/components/WBGraph.tsx index 712ab99..b2eacb2 100644 --- a/components/WBGraph.tsx +++ b/components/WBGraph.tsx @@ -1,5 +1,6 @@ "use client"; +import { memo } from "react"; import { ScatterChart, Scatter, @@ -9,7 +10,6 @@ import { Tooltip, ResponsiveContainer, ReferenceLine, - Label, } from "recharts"; import { EnvelopePoint } from "../data/aircraft"; @@ -22,21 +22,21 @@ interface WBGraphProps { isDark: boolean; } -const RenderTakeoffPoint = (props: any) => { +const RenderTakeoffPoint = (props: { cx: number; cy: number }) => { const { cx, cy } = props; return ( ); }; -const RenderLandingPoint = (props: any) => { +const RenderLandingPoint = (props: { cx: number; cy: number }) => { const { cx, cy } = props; return ( ); }; -export default function WBGraph({ envelope, takeoffWeight, takeoffCG, landingWeight, landingCG, isDark }: WBGraphProps) { +function WBGraph({ envelope, takeoffWeight, takeoffCG, landingWeight, landingCG, isDark }: WBGraphProps) { const takeoffPoint = [{ cg: takeoffCG, weight: takeoffWeight }]; const landingPoint = landingWeight ? [{ cg: landingCG, weight: landingWeight }] : []; @@ -72,13 +72,7 @@ export default function WBGraph({ envelope, takeoffWeight, takeoffCG, landingWei stroke={axisColor} tick={{ fill: axisColor, fontSize: 12 }} > - {/*