diff --git a/src/components/widgets/glances/glances.jsx b/src/components/widgets/glances/glances.jsx index d3da7200..ddf14188 100644 --- a/src/components/widgets/glances/glances.jsx +++ b/src/components/widgets/glances/glances.jsx @@ -1,4 +1,5 @@ import useSWR from "swr"; +import { useContext } from "react"; import { BiError } from "react-icons/bi"; import { FaMemory, FaRegClock, FaThermometerHalf } from "react-icons/fa"; import { FiCpu, FiHardDrive } from "react-icons/fi"; @@ -6,6 +7,8 @@ import { useTranslation } from "next-i18next"; import UsageBar from "../resources/usage-bar"; +import { SettingsContext } from "utils/contexts/settings"; + const cpuSensorLabels = ["cpu_thermal", "Core", "Tctl"]; function convertToFahrenheit(t) { @@ -14,6 +17,7 @@ function convertToFahrenheit(t) { export default function Widget({ options }) { const { t, i18n } = useTranslation(); + const { settings } = useContext(SettingsContext); const { data, error } = useSWR( `/api/widgets/glances?${new URLSearchParams({ lang: i18n.language, ...options }).toString()}`, { @@ -93,7 +97,7 @@ export default function Widget({ options }) { : [data.fs.find((d) => d.mnt_point === options.disk)].filter((d) => d); return ( -