Skip to content

Commit

Permalink
Merge pull request #170 from starknet-id/fix/quizz-and-navbar
Browse files Browse the repository at this point in the history
fix: quiz and navbar
  • Loading branch information
fricoben authored Sep 27, 2023
2 parents 5897e45 + c6632e1 commit 87f1790
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/UI/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const Navbar: FunctionComponent = () => {

return (
<>
<div className={`fixed w-full z-[1]`}>
<div className={`fixed w-full z-[1]`} id="nav">
<div
className={`${styles.navbarContainer} ${
navbarBg ? styles.navbarScrolled : ""
Expand Down
3 changes: 3 additions & 0 deletions components/quiz/quiz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,16 @@ const Quiz: FunctionComponent<QuizProps> = ({
useEffect(() => {
const documentBody = document.querySelector("body");
const footer = document.querySelector("footer");
const navbar = document.getElementById("nav");
// Mount
if (documentBody) documentBody.style.overflow = "hidden";
if (footer) footer.style.display = "none";
if (navbar) navbar.style.display = "none";
// Unmount
return () => {
if (documentBody) documentBody.style.removeProperty("overflow");
if (footer) footer.style.removeProperty("display");
if (navbar) navbar.style.removeProperty("display");
};
}, []);

Expand Down

1 comment on commit 87f1790

@vercel
Copy link

@vercel vercel bot commented on 87f1790 Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.