mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-13 00:18:50 +00:00
pass chart to all containers
This commit is contained in:
parent
ef3da08d93
commit
7a1f8850b8
9 changed files with 23 additions and 23 deletions
|
@ -38,17 +38,17 @@ export default function Component({ service }) {
|
|||
}, [data, sensorName]);
|
||||
|
||||
if (error) {
|
||||
return <Container><Error error={error} /></Container>;
|
||||
return <Container chart={chart}><Error error={error} /></Container>;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return <Container><Block position="bottom-3 left-3">-</Block></Container>;
|
||||
return <Container chart={chart}><Block position="bottom-3 left-3">-</Block></Container>;
|
||||
}
|
||||
|
||||
const sensorData = data.find((item) => item.label === sensorName);
|
||||
|
||||
if (!sensorData) {
|
||||
return <Container><Block position="bottom-3 left-3">-</Block></Container>;
|
||||
return <Container chart={chart}><Block position="bottom-3 left-3">-</Block></Container>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue