From a90f178ee0f80b3ce2f6145d8babf2773743c73c Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 31 Mar 2023 08:44:27 -0700 Subject: [PATCH] Better handle multi-core temp --- src/components/widgets/resources/cputemp.jsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/widgets/resources/cputemp.jsx b/src/components/widgets/resources/cputemp.jsx index 68e0d71d..22eecb06 100644 --- a/src/components/widgets/resources/cputemp.jsx +++ b/src/components/widgets/resources/cputemp.jsx @@ -5,6 +5,10 @@ import { useTranslation } from "next-i18next"; import UsageBar from "./usage-bar"; +function convertToFahrenheit(t) { + return t * 5/9 + 32 +} + export default function CpuTemp({ expanded, units }) { const { t } = useTranslation(); @@ -23,7 +27,7 @@ export default function CpuTemp({ expanded, units }) { ); } - if (!data) { + if (!data || !data.cputemp) { return (