mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-15 13:52:09 +08:00
pass chart to all containers
This commit is contained in:
@@ -42,18 +42,18 @@ export default function Component({ service }) {
|
||||
}, [data, gpuName]);
|
||||
|
||||
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>;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const gpuData = data.find((item) => item[item.key] == gpuName);
|
||||
|
||||
if (!gpuData) {
|
||||
return <Container><Block position="bottom-3 left-3">-</Block></Container>;
|
||||
return <Container chart={chart}><Block position="bottom-3 left-3">-</Block></Container>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user