mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Better handle loading blocks
This commit is contained in:
@@ -998,5 +998,8 @@
|
||||
"progressing": "Progressing",
|
||||
"missing": "Missing",
|
||||
"suspended": "Suspended"
|
||||
},
|
||||
"spoolman": {
|
||||
"loading": "Loading"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,10 +16,13 @@ export default function Component({ service }) {
|
||||
}
|
||||
|
||||
if (!spoolData) {
|
||||
const nBlocksGuess = widget.spoolIds?.length ?? 4;
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="spoolman.spool1" />
|
||||
<Block label="spoolman.spool2" />
|
||||
{[...Array(nBlocksGuess)].map((_, i) => (
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
<Block key={i} label="spoolman.loading" />
|
||||
))}
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user