style: auto-fix lint and format
This commit is contained in:
1 parent
cbb5e301dc
commit
c751feedf7
3 files changed
+9
-10
No files matched your search
@@ -24,13 +24,15 @@ export const { definition, componentLoader } = createWidgetDefinition("beszelSys
|
||||
withDescription: true,
|
||||
clearable: true,
|
||||
useOptions: (integrationIds: string[]) => {
|
||||
const { data = [], isPending, isError } = clientApi.widget.beszel.getSystems.useQuery(
|
||||
const {
|
||||
data = [],
|
||||
isPending,
|
||||
isError,
|
||||
} = clientApi.widget.beszel.getSystems.useQuery(
|
||||
{ integrationIds },
|
||||
{ enabled: integrationIds.length > 0, staleTime: 30_000 },
|
||||
);
|
||||
const selectData = data.flatMap((r) =>
|
||||
r.systems.map((s) => ({ value: s.id, label: s.name })),
|
||||
);
|
||||
const selectData = data.flatMap((r) => r.systems.map((s) => ({ value: s.id, label: s.name })));
|
||||
return { data: selectData, isPending, isError };
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user