feat: enable show or hide traffic graph

This commit is contained in:
GyDi
2022-02-19 18:14:40 +08:00
parent 10b55c043c
commit 0245baf1b6
8 changed files with 51 additions and 41 deletions

View File

@@ -26,6 +26,9 @@ export default function useTrafficGraph() {
const drawGraph = () => {
const canvas = canvasRef.current!;
if (!canvas) return;
const context = canvas.getContext("2d")!;
const width = canvas.width;
const height = canvas.height;