Skip to content

Commit

Permalink
Fix Preloader responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
itsyourap committed Apr 21, 2024
1 parent cfdb45f commit fd144b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion client/app/loading.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
'use client';

import Preloader from '../component/Preloader';
import useMediaQuery from '../hooks/useMediaQuery';

const Loading = ({ suspense }) => {
return <Preloader width="600px" height="600px" suspense={suspense} />;
const isDesktop = useMediaQuery('(min-width:700px)');
const side = isDesktop ? "600px" : "300px";
return <Preloader width={side} height={side} suspense={suspense} />
};

export default Loading;
2 changes: 1 addition & 1 deletion client/styles/Navbar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
}

.Hamburger_menu {
z-index: 9999999999;
z-index: 99999;
position: fixed;
top: 0;
width: 100vw;
Expand Down
2 changes: 1 addition & 1 deletion client/styles/Preloader.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
top: 0;
left: 0;
right: 0;
z-index: 10000;
z-index: 100000;
}


Expand Down

0 comments on commit fd144b9

Please sign in to comment.