From 082148e0c02a43e5f089ea9ec474f00246efefe6 Mon Sep 17 00:00:00 2001 From: MarconLP <13001502+MarconLP@users.noreply.github.com> Date: Wed, 12 Apr 2023 20:19:26 +0200 Subject: [PATCH] improve video player ui --- src/pages/share/[videoId].tsx | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/pages/share/[videoId].tsx b/src/pages/share/[videoId].tsx index 326fd83..6308314 100644 --- a/src/pages/share/[videoId].tsx +++ b/src/pages/share/[videoId].tsx @@ -10,7 +10,7 @@ const VideoList: NextPage = () => { const router = useRouter(); const { videoId } = router.query as { videoId: string }; - const { data: video } = api.video.get.useQuery( + const { data: video, isLoading } = api.video.get.useQuery( { videoId }, { enabled: router.isReady, @@ -18,7 +18,7 @@ const VideoList: NextPage = () => { } ); - if (!video?.success) { + if (!isLoading && !video?.success) { return (
@@ -40,7 +40,7 @@ const VideoList: NextPage = () => {
- Screenity | {video?.video?.title ?? ""} + Screenity
@@ -52,15 +52,20 @@ const VideoList: NextPage = () => {
-
- {video?.video?.video_url && ( - - )} +
+
+ {/*{true ? (*/} + {/*
*/} + {/*) : null}*/} + {video?.video?.video_url && ( + + )} +