Skip to content

Commit

Permalink
@0.2.11: see previous
Browse files Browse the repository at this point in the history
  • Loading branch information
artemis-prime committed Feb 3, 2024
1 parent 5978cfa commit db649da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions pkgs/luxdefi-ui/blocks/components/video-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ const VideoBlockComponent: React.FC<{
})
}

const windowDefined = typeof window !== 'undefined'

useEffect(() => {
if (window) {
window.addEventListener('resize', onResize)
return () => window.removeEventListener('resize', onResize)
}
}, [window])
}, [windowDefined])

useLayoutEffect(() => {
onResize()
Expand All @@ -55,10 +57,11 @@ const VideoBlockComponent: React.FC<{
const height = `${b.sizing.vh}vh`
return <div className='dummy-div' style={{
maxWidth: '100%',
maxHeight: '100%',
height: height,
width: `calc(${height}*${ar})`,
backgroundImage: `url(${b.poster!})`,
backgroundSize: 'cover',
backgroundSize: 'contain',
backgroundRepeat: 'no-repeat',
}} />
}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/luxdefi-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luxdefi/ui",
"version": "0.2.10",
"version": "0.2.11",
"description": "Library that contains shared UI primitives, styles, and core types",
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down

0 comments on commit db649da

Please sign in to comment.