Merge branch 'main' of https://github.com/Oupsman/homepage into main

This commit is contained in:
Benoit
2022-12-09 21:06:38 +01:00
7 changed files with 250 additions and 38 deletions

View File

@@ -11,11 +11,11 @@ export default function Component({ service }) {
const { data: torrentData, error: torrentError } = useWidgetAPI(widget, "torrents");
if (torrentError) {
return <Container error={torrentError} />;
if (torrentError || !torrentData?.torrents) {
return <Container error={torrentError ?? {message: "No torrent data returned"}} />;
}
if (!torrentData) {
if (!torrentData || !torrentData.torrents) {
return (
<Container service={service}>
<Block label="flood.leech" />