fix: trpc error at least one integration (#1660)
This commit is contained in:
@@ -9,7 +9,6 @@ import type { ScopedTranslationFunction } from "@homarr/translation";
|
||||
import { useScopedI18n } from "@homarr/translation/client";
|
||||
|
||||
import type { WidgetComponentProps } from "../../definition";
|
||||
import { NoIntegrationSelectedError } from "../../errors";
|
||||
import { NoIntegrationDataError } from "../../errors/no-data-integration";
|
||||
|
||||
export default function MediaServerWidget({
|
||||
@@ -58,8 +57,6 @@ export default function MediaServerWidget({
|
||||
|
||||
const { mutate: mutateRequestAnswer } = clientApi.widget.mediaRequests.answerRequest.useMutation();
|
||||
|
||||
if (integrationIds.length === 0) throw new NoIntegrationSelectedError();
|
||||
|
||||
if (mediaRequests.length === 0) throw new NoIntegrationDataError();
|
||||
|
||||
return (
|
||||
|
||||
@@ -21,7 +21,6 @@ import type { RequestStats } from "@homarr/integrations/types";
|
||||
import { useScopedI18n } from "@homarr/translation/client";
|
||||
|
||||
import type { WidgetComponentProps } from "../../definition";
|
||||
import { NoIntegrationSelectedError } from "../../errors";
|
||||
import { NoIntegrationDataError } from "../../errors/no-data-integration";
|
||||
import classes from "./component.module.css";
|
||||
|
||||
@@ -43,8 +42,6 @@ export default function MediaServerWidget({
|
||||
|
||||
const { width, height, ref } = useElementSize();
|
||||
|
||||
if (integrationIds.length === 0) throw new NoIntegrationSelectedError();
|
||||
|
||||
if (requestStats.users.length === 0 && requestStats.stats.length === 0) throw new NoIntegrationDataError();
|
||||
|
||||
//Add processing and available
|
||||
|
||||
Reference in New Issue
Block a user