From 813f90fe323b57f1ff8c0237ad493ff0545667a3 Mon Sep 17 00:00:00 2001 From: Cooper Date: Fri, 12 Jul 2024 00:16:15 +0000 Subject: [PATCH] Delete captions icon from player settings hotbar --- src/components/player/atoms/Captions.tsx | 28 ------------------------ src/components/player/atoms/index.ts | 1 - src/pages/parts/player/PlayerPart.tsx | 12 ++-------- 3 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 src/components/player/atoms/Captions.tsx diff --git a/src/components/player/atoms/Captions.tsx b/src/components/player/atoms/Captions.tsx deleted file mode 100644 index 89e419e0..00000000 --- a/src/components/player/atoms/Captions.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { useEffect } from "react"; - -import { Icons } from "@/components/Icon"; -import { OverlayAnchor } from "@/components/overlays/OverlayAnchor"; -import { VideoPlayerButton } from "@/components/player/internals/Button"; -import { useOverlayRouter } from "@/hooks/useOverlayRouter"; -import { usePlayerStore } from "@/stores/player/store"; - -export function Captions() { - const router = useOverlayRouter("settings"); - const setHasOpenOverlay = usePlayerStore((s) => s.setHasOpenOverlay); - - useEffect(() => { - setHasOpenOverlay(router.isRouterActive); - }, [setHasOpenOverlay, router.isRouterActive]); - - return ( - - { - router.open(); - router.navigate("/captionsOverlay"); - }} - icon={Icons.CAPTIONS} - /> - - ); -} diff --git a/src/components/player/atoms/index.ts b/src/components/player/atoms/index.ts index 6be88fd6..3caf8154 100644 --- a/src/components/player/atoms/index.ts +++ b/src/components/player/atoms/index.ts @@ -16,4 +16,3 @@ export * from "./VolumeChangedPopout"; export * from "./NextEpisodeButton"; export * from "./Chromecast"; export * from "./CastingNotification"; -export * from "./Captions"; diff --git a/src/pages/parts/player/PlayerPart.tsx b/src/pages/parts/player/PlayerPart.tsx index f012f8ea..1f55013b 100644 --- a/src/pages/parts/player/PlayerPart.tsx +++ b/src/pages/parts/player/PlayerPart.tsx @@ -111,10 +111,7 @@ export function PlayerPart(props: PlayerPartProps) { ) : null} {status === playerStatus.PLAYBACK_ERROR || status === playerStatus.PLAYING ? ( - <> - - - + ) : null} @@ -124,12 +121,7 @@ export function PlayerPart(props: PlayerPartProps) {
{status === playerStatus.PLAYING ? : null} - {status === playerStatus.PLAYING ? ( - <> - - - - ) : null} + {status === playerStatus.PLAYING ? : null}