From bbf5645c2b4907bafa04d083bb8e5f3cb8f9be23 Mon Sep 17 00:00:00 2001 From: "Contreras, Raf" Date: Sun, 24 Dec 2023 14:58:07 +1300 Subject: [PATCH] PR review changes --- src/index.tsx | 34 ++++++++++++----------- src/pages/parts/auth/TrustBackendPart.tsx | 2 +- src/pages/parts/player/MetaPart.tsx | 3 +- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 3d9f9246..a0376611 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4,7 +4,7 @@ import "./stores/__old/imports"; import "@/setup/ga"; import "@/assets/css/index.css"; -import React, { Suspense, useCallback } from "react"; +import { StrictMode, Suspense, useCallback } from "react"; import type { ReactNode } from "react"; import { createRoot } from "react-dom/client"; import { HelmetProvider } from "react-helmet-async"; @@ -145,19 +145,21 @@ const container = document.getElementById("root"); const root = createRoot(container!); root.render( - - - - }> - - - - - - - - - - - , + + + + + }> + + + + + + + + + + + + , ); diff --git a/src/pages/parts/auth/TrustBackendPart.tsx b/src/pages/parts/auth/TrustBackendPart.tsx index 91cbae9e..0cc4d8b6 100644 --- a/src/pages/parts/auth/TrustBackendPart.tsx +++ b/src/pages/parts/auth/TrustBackendPart.tsx @@ -55,7 +55,7 @@ export function TrustBackendPart(props: TrustBackendPartProps) { icon={} > - {{ hostname }} + {[{ hostname }]} diff --git a/src/pages/parts/player/MetaPart.tsx b/src/pages/parts/player/MetaPart.tsx index 79ade255..1ea6cd7e 100644 --- a/src/pages/parts/player/MetaPart.tsx +++ b/src/pages/parts/player/MetaPart.tsx @@ -53,7 +53,8 @@ export function MetaPart(props: MetaPartProps) { let data: ReturnType = null; try { - data = decodeTMDBId(params.media as string); + if (!params.media) throw new Error("no media params"); + data = decodeTMDBId(params.media); } catch { // error dont matter, itll just be a 404 }