refactor: use suspense query instead of serverdata for app widget (#1143)
* refactor: use suspense query instead of serverdata for app widget * chore: add missing translation for loading tooltip
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IconApps } from "@tabler/icons-react";
|
||||
import { IconApps, IconDeviceDesktopX } from "@tabler/icons-react";
|
||||
|
||||
import { createWidgetDefinition } from "../definition";
|
||||
import { optionsBuilder } from "../options";
|
||||
@@ -12,6 +12,11 @@ export const { definition, componentLoader, serverDataLoader } = createWidgetDef
|
||||
showDescriptionTooltip: factory.switch({ defaultValue: false }),
|
||||
pingEnabled: factory.switch({ defaultValue: false }),
|
||||
})),
|
||||
})
|
||||
.withServerData(() => import("./serverData"))
|
||||
.withDynamicImport(() => import("./component"));
|
||||
errors: {
|
||||
NOT_FOUND: {
|
||||
icon: IconDeviceDesktopX,
|
||||
message: (t) => t("widget.app.error.notFound.label"),
|
||||
hideLogsLink: true,
|
||||
},
|
||||
},
|
||||
}).withDynamicImport(() => import("./component"));
|
||||
|
||||
Reference in New Issue
Block a user