Skip to content

Commit

Permalink
Fix reserving space before video loads
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciejSWM committed Mar 7, 2024
1 parent d7693f3 commit ef67f91
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/components/OnboardingWelcomeVideo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ function OnboardingWelcomeVideo() {
};

const getWelcomeVideo = () => {
// When container didn't even mount and set it's dimensions,
// don't bother rendering the video player.
if (!containerDimensions.current) {
return;
}

const videoWidth = containerDimensions.current.width - 2 * MODAL_PADDING;

return (
Expand All @@ -104,7 +98,7 @@ function OnboardingWelcomeVideo() {
// for the video until it loads. Also, when
// welcomeVideoStatus === 'animation' it will
// set as much height as the video would.
{height: videoWidth / videoAspectRatio},
{width: '100%', aspectRatio: VIDEO_ASPECT_RATIO},
]}
>
{welcomeVideoStatus === 'video' ? (
Expand Down

0 comments on commit ef67f91

Please sign in to comment.