fix: make system health temp optional (#2247)

This commit is contained in:
Manuel
2025-02-04 19:10:12 +01:00
committed by GitHub
parent 8058b6207a
commit da09826393
3 changed files with 8 additions and 6 deletions

View File

@@ -347,9 +347,14 @@ const CpuRing = ({ cpuUtilization }: { cpuUtilization: number }) => {
);
};
const CpuTempRing = ({ fahrenheit, cpuTemp }: { fahrenheit: boolean; cpuTemp: number }) => {
const CpuTempRing = ({ fahrenheit, cpuTemp }: { fahrenheit: boolean; cpuTemp: number | undefined }) => {
const { width, ref } = useElementSize();
const fallbackWidth = width || 1; // See https://github.com/homarr-labs/homarr/issues/2196
if (!cpuTemp) {
return null;
}
return (
<Box ref={ref} w="100%" h="100%" className="health-monitoring-cpu-temperature">
<RingProgress