Skip to content

Commit

Permalink
Merge pull request #22 from SayarB/sayar
Browse files Browse the repository at this point in the history
fix: minor bug ifx
  • Loading branch information
SayarB authored Nov 2, 2023
2 parents b834ec9 + d960ca6 commit d0e11b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/components/StartAnim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const StartAnim = ({ onComplete, style }: Props) => {
useEffect(() => {
if (window) {
setPotraitMode(window.innerWidth < window.innerHeight)
setScreenAspect(window.innerWidth / window.innerHeight)
}
}, [])

Expand All @@ -33,7 +34,7 @@ const StartAnim = ({ onComplete, style }: Props) => {
return <div className="fixed top-0 bottom-0 left-0 right-0 flex items-center justify-center overflow-hidden bg-white -z-10" style={style} ><Player
src={potraitMode ? LoadingMobile : LoadingAnimation}
autoplay
style={{ minHeight: potraitMode ? (screenAspect < aspect ? innerHeight + 'px' : undefined) : (screenAspect < aspect ? innerHeight + 'px' : undefined), minWidth: potraitMode ? (screenAspect > aspect ? innerWidth + "px" : undefined) : (screenAspect > aspect ? innerWidth + "px" : undefined), aspectRatio: aspect, zIndex: 0, backgroundColor: "transparent" }}
style={{ minHeight: potraitMode ? (screenAspect < aspect ? innerHeight + 'px' : undefined) : (screenAspect < aspect ? window.innerHeight + 'px' : undefined), minWidth: potraitMode ? (screenAspect > aspect ? innerWidth + "px" : undefined) : (screenAspect > aspect ? window.innerWidth + "px" : undefined), aspectRatio: aspect, zIndex: 0, backgroundColor: "transparent" }}

/></div>
}
Expand Down

0 comments on commit d0e11b9

Please sign in to comment.