From 46df43d72a1d0f9e1a0aaabae6148611a7257134 Mon Sep 17 00:00:00 2001 From: shm Date: Sun, 3 Nov 2024 17:59:36 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20GPU=E6=83=85=E5=A0=B1=E5=8F=96=E5=BE=97?= =?UTF-8?q?=E5=A4=B1=E6=95=97=E6=99=82=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/template/Dashboard.tsx | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/template/Dashboard.tsx b/src/template/Dashboard.tsx index 1facfda..7c709a1 100644 --- a/src/template/Dashboard.tsx +++ b/src/template/Dashboard.tsx @@ -147,26 +147,24 @@ const MemoryInfo = () => { }; const Dashboard = () => { - return ( - <> -
- - - - - - -
+ const { hardwareInfo } = useHardwareInfoAtom(); -
- - - - - - -
- + const hardwareInfoList: { key: string; component: JSX.Element }[] = [ + hardwareInfo.cpu && { key: "cpuInfo", component: }, + hardwareInfo.gpus && { key: "gpuInfo", component: }, + hardwareInfo.memory && { key: "memoryInfo", component: }, + { + key: "processesTable", + component: , + }, + ].filter((x) => x != null); + + return ( +
+ {hardwareInfoList.map(({ key, component }) => ( + {component} + ))} +
); };