refactor: replace custom no integration selected logic with existing error (#1166)

This commit is contained in:
Meier Lukas
2024-09-23 22:44:56 +02:00
committed by GitHub
parent 6aa5adf5b0
commit cc29cb8e43
4 changed files with 31 additions and 35 deletions

View 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,
};
}
}