diff --git a/src/components/Body.tsx b/src/components/Body.tsx index 9ddd1a3..3a23584 100644 --- a/src/components/Body.tsx +++ b/src/components/Body.tsx @@ -1,7 +1,7 @@ // local imports import React from 'react' import ChartDisplay from './ChartDisplay' -import { getChart1Data } from '../static/helpers' +import { getChart1Data, getChart2Data } from '../static/helpers' import { type ChartDataType } from '../interfaces/interface' const Body: React.FC = () => { @@ -22,13 +22,15 @@ const Body: React.FC = () => { // useEffect hook React.useEffect(() => { if (chartNum === 1) setCurrentChartData(getChart1Data()) - else if (chartNum === 2) setCurrentChartData(getChart1Data()) + else if (chartNum === 2) setCurrentChartData(getChart2Data()) }, [chartNum]) // return statement return (
-
{}
+
+ {} +