File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
frontend/src/components/dashboard/base-items/widgets Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export const SystemMonitorWidget = ({ config }: SystemMonitorWidgetProps) => {
3939 } ) ;
4040 const [ openSystemModal , setOpenSystemModal ] = useState ( false ) ;
4141 const [ isFahrenheit , setIsFahrenheit ] = useState ( config ?. temperatureUnit !== 'celsius' ) ;
42- const [ errorMessage , setErrorMessage ] = useState < string | null > ( ' null' ) ;
42+ const [ errorMessage , setErrorMessage ] = useState < string | null > ( null ) ;
4343 const [ isLoading , setIsLoading ] = useState ( false ) ;
4444
4545 // Default gauges if not specified in config
@@ -442,7 +442,7 @@ export const SystemMonitorWidget = ({ config }: SystemMonitorWidgetProps) => {
442442 p : 2
443443 } } >
444444 < Typography variant = 'subtitle1' align = 'center' sx = { { mb : 1 } } >
445- { errorMessage }
445+ { ! errorMessage || errorMessage === 'null' ? 'Error fetching system data' : errorMessage }
446446 </ Typography >
447447 < Button
448448 variant = 'contained'
Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ export const WeatherWidget: React.FC<WeatherWidgetProps> = ({ config }) => {
316316 p : 2
317317 } } >
318318 < Typography variant = 'subtitle1' align = 'center' sx = { { mb : 1 } } >
319- { errorMessage }
319+ { ! errorMessage || errorMessage === 'null' ? 'Error fetching weather data' : errorMessage }
320320 </ Typography >
321321 < Button
322322 variant = 'contained'
You can’t perform that action at this time.
0 commit comments