From 44740aed6a2d17f0e1178c2d5b6351bcc63f5928 Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Thu, 4 Jan 2024 00:55:24 +0100 Subject: [PATCH] Create WarningPart for in-player use --- src/pages/parts/player/ScrapingPart.tsx | 14 +++----------- src/pages/parts/util/WarningPart.tsx | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 src/pages/parts/util/WarningPart.tsx diff --git a/src/pages/parts/player/ScrapingPart.tsx b/src/pages/parts/player/ScrapingPart.tsx index eb0e5bfc..70a7b826 100644 --- a/src/pages/parts/player/ScrapingPart.tsx +++ b/src/pages/parts/player/ScrapingPart.tsx @@ -9,7 +9,6 @@ import { scrapePartsToProviderMetric, useReportProviders, } from "@/backend/helpers/report"; -import { Icon, Icons } from "@/components/Icon"; import { Loading } from "@/components/layout/Loading"; import { ScrapeCard, @@ -21,7 +20,8 @@ import { useListCenter, useScrape, } from "@/hooks/useProviderScrape"; -import { LargeTextPart } from "@/pages/parts/util/LargeTextPart"; + +import { WarningPart } from "../util/WarningPart"; export interface ScrapingProps { media: ScrapeMedia; @@ -88,15 +88,7 @@ export function ScrapingPart(props: ScrapingProps) { currentProviderIndex = sourceOrder.length - 1; if (failedStartScrape) - return ( - - } - > - {t("player.turnstile.error")} - - ); + return {t("player.turnstile.error")}; return (
+ + +
+ {props.children} +
+
+ ); +}