diff --git a/src/App.jsx b/src/App.jsx index 363c244..ee69e60 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -7,6 +7,7 @@ function densityDecay(distance) { return distance; } const FullScreenCanvas = () => { + const [isCollapse, setIsCollapse] = useState(false); const [isPause, setIsPause] = useState(false); const [chartData, setChartData] = useState(null); const [core, setCore] = useState(null); @@ -136,42 +137,58 @@ const FullScreenCanvas = () => { background: "rgba(0,0,0,0.1)", }} > - - - {chartData && ( - index), - label: "Steps", - }, - ]} - yAxis={[ - { - label: "Sensor Distance", - max: 15, - min: 0, - }, - ]} - series={chartData} - width={Math.min(400, document.documentElement.clientWidth)} - height={300} - /> - )} - {!isPause && ( - + + {!isCollapse && ( + <> + + + {chartData && ( + index), + label: "Steps", + }, + ]} + yAxis={[ + { + label: "Sensor Distance", + max: 15, + min: 0, + }, + ]} + series={chartData} + width={Math.min(400, document.documentElement.clientWidth)} + height={300} + /> + )} + {!isPause && ( + + )} + )}