refactor: replace custom no integration selected logic with existing error (#1166)
This commit is contained in:
19
packages/widgets/src/errors/no-data-integration.tsx
Normal file
19
packages/widgets/src/errors/no-data-integration.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { IconDatabaseOff } from "@tabler/icons-react";
|
||||
|
||||
import type { TranslationFunction } from "@homarr/translation";
|
||||
|
||||
import { ErrorBoundaryError } from "./base";
|
||||
|
||||
export class NoIntegrationDataError extends ErrorBoundaryError {
|
||||
constructor() {
|
||||
super("No integration data available");
|
||||
}
|
||||
|
||||
public getErrorBoundaryData() {
|
||||
return {
|
||||
icon: IconDatabaseOff,
|
||||
message: (t: TranslationFunction) => t("widget.common.error.noData"),
|
||||
showLogsLink: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user