Added Pre Commit
This commit is contained in:
parent
4241343a29
commit
8f238c546d
@ -62,5 +62,6 @@
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"osx-temperature-sensor": "^1.0.8"
|
||||
}
|
||||
},
|
||||
"packageManager": "pnpm@9.2.0+sha512.98a80fd11c2e7096747762304106432b3ddc67dcf54b5a8c01c93f68a2cd5e05e6821849522a06fb76284d41a2660d5e334f2ee3bbf29183bf2e739b1dafa771"
|
||||
}
|
||||
|
||||
@ -4,16 +4,16 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||
|
||||
export default function Component({ service }) {
|
||||
const { widget } = service;
|
||||
|
||||
|
||||
const { data: giteaNotifications, error: giteaNotificationsError } = useWidgetAPI(widget, "notifications");
|
||||
const { data: giteaIssues, error: giteaIssuesError } = useWidgetAPI(widget, "issues");
|
||||
const { data: giteaRepos, error: giteaReposError } = useWidgetAPI(widget, "repos");
|
||||
|
||||
if (giteaNotificationsError || giteaIssuesError || giteaReposError) {
|
||||
|
||||
if (giteaNotificationsError || giteaIssuesError || giteaReposError) {
|
||||
return <Container service={service} error={giteaNotificationsError ?? giteaIssuesError ?? giteaReposError} />;
|
||||
}
|
||||
|
||||
if (!giteaNotifications || !giteaIssues || !giteaRepos ) {
|
||||
if (!giteaNotifications || !giteaIssues || !giteaRepos) {
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="gitea.notifications" />
|
||||
|
||||
@ -17,8 +17,8 @@ const widget = {
|
||||
}),
|
||||
},
|
||||
repos: {
|
||||
endpoint: "repos/search"
|
||||
}
|
||||
endpoint: "repos/search",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user