Skip to content

Commit

Permalink
don't call getGPUTier when animation is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ramondeklein committed Nov 6, 2024
1 parent 3025ce8 commit 9f45b4f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/LoginWrapper/LoginWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const CustomLogin = styled.div(({ theme }) => {
[`@media (min-width: ${get(
breakPoints,
"xs",
0,
0
)}px) and (max-width: ${get(breakPoints, "md", 0)}px)`]: {
maxWidth: "100%",
},
Expand Down Expand Up @@ -145,7 +145,7 @@ const CustomLogin = styled.div(({ theme }) => {
borderTop: `${get(
theme,
"login.footerDivider",
"#f2f2f2",
"#f2f2f2"
)} 1px solid`,
padding: "35px 0",
textAlign: "center",
Expand Down Expand Up @@ -174,12 +174,13 @@ const LoginWrapper: FC<LoginWrapperProps> = ({

useEffect(() => {
(async () => {
const gpuTier = await getGPUTier();

setGPUAvailable(!!gpuTier.gpu && gpuTier.tier >= 2);
if (backgroundAnimation) {
const gpuTier = await getGPUTier();
setGPUAvailable(!!gpuTier.gpu && gpuTier.tier >= 2);
}
return;
})();
}, []);
}, [backgroundAnimation]);

return (
<CustomLogin>
Expand Down

0 comments on commit 9f45b4f

Please sign in to comment.