From b1b604d322690c5135108214074fd801b3ff2806 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Thu, 30 Nov 2023 20:05:49 +0100 Subject: [PATCH] hide pause when loading Co-authored-by: Jip Frijlink --- src/components/player/atoms/Pause.tsx | 3 ++- src/pages/parts/player/PlayerPart.tsx | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/player/atoms/Pause.tsx b/src/components/player/atoms/Pause.tsx index 8594d090..6e33a142 100644 --- a/src/components/player/atoms/Pause.tsx +++ b/src/components/player/atoms/Pause.tsx @@ -2,7 +2,7 @@ import { Icons } from "@/components/Icon"; import { VideoPlayerButton } from "@/components/player/internals/Button"; import { usePlayerStore } from "@/stores/player/store"; -export function Pause(props: { iconSizeClass?: string }) { +export function Pause(props: { iconSizeClass?: string; className?: string }) { const display = usePlayerStore((s) => s.display); const { isPaused } = usePlayerStore((s) => s.mediaPlaying); @@ -13,6 +13,7 @@ export function Pause(props: { iconSizeClass?: string }) { return ( s.status); const { isMobile } = useIsMobile(); + const isLoading = usePlayerStore((s) => s.mediaPlaying.isLoading); return ( @@ -38,10 +39,13 @@ export function PlayerPart(props: PlayerPartProps) { - +