Skip to content

Commit

Permalink
Update SimpleBackdrop.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Jun 9, 2024
1 parent 0ad49f9 commit 0a3b70a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion backend/src/components/SimpleBackdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ interface SimpleBackdropProps {
text?: string
}

const marginTop = env.isMobile() ? 56 : 64

const SimpleBackdrop = ({ progress, text }: SimpleBackdropProps) => (
<div>
<Backdrop
Expand All @@ -19,7 +21,7 @@ const SimpleBackdrop = ({ progress, text }: SimpleBackdropProps) => (
color: '#fff',
zIndex: 1402,
height: window.innerHeight,
marginTop: `${document.documentElement.scrollHeight - (window.innerHeight + (env.isMobile() ? 56 : 64))}px`
marginTop: `${document.documentElement.scrollTop - marginTop}px`
}}
>
{progress && <CircularProgress color="inherit" sx={{ marginRight: 5 }} />}
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/SimpleBackdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ interface SimpleBackdropProps {
text?: string
}

const marginTop = env.isMobile() ? 56 : 64

const SimpleBackdrop = ({ progress, text }: SimpleBackdropProps) => (
<div>
<Backdrop
Expand All @@ -19,7 +21,7 @@ const SimpleBackdrop = ({ progress, text }: SimpleBackdropProps) => (
color: '#fff',
zIndex: 1402,
height: window.innerHeight,
marginTop: `${document.documentElement.scrollHeight - (window.innerHeight + (env.isMobile() ? 56 : 64))}px`
marginTop: `${document.documentElement.scrollTop - marginTop}px`
}}
>
{progress && <CircularProgress color="inherit" sx={{ marginRight: 5 }} />}
Expand Down

0 comments on commit 0a3b70a

Please sign in to comment.