Skip to content

Commit

Permalink
fix: scroll-to-top button (#1657)
Browse files Browse the repository at this point in the history
Co-authored-by: akshatnema <[email protected]>
  • Loading branch information
Shurtu-gal and akshatnema authored Dec 7, 2023
1 parent 1a78f60 commit 585fed6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/buttons/ScrollButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function ScrollButton(){

})
}
return <div className="fixed bottom-14 right-4 h-16 w-12 z-50">
return <div className="fixed bottom-14 right-4 h-16 w-12 z-40">
{backToTopButton &&(
<button className="rounded-full shadow-md bg-white " onClick={scrollUp}> <img src={scrollImage}/></button>
)}
Expand Down
2 changes: 1 addition & 1 deletion components/navigation/MobileNavMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Link from 'next/link';

export default function MobileNavMenu({ onClickClose = () => {} }) {
return (
<div className="fixed top-0 inset-x-0 py-2 transition transform origin-top-right max-h-full lg:hidden overflow-y-scroll">
<div className="fixed top-0 z-60 inset-x-0 py-2 transition transform origin-top-right max-h-full lg:hidden overflow-y-scroll">
<div className="rounded-lg shadow-lg">
<div className="rounded-lg shadow-xs bg-white divide-y-2 divide-gray-50">
<div className="pt-5 pb-6 px-5 space-y-6">
Expand Down
3 changes: 1 addition & 2 deletions components/navigation/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import LearningPanel from './LearningPanel'
import CommunityPanel from "./CommunityPanel"
import MobileNavMenu from './MobileNavMenu'
import otherItems from './otherItems'

import GithubButton from "../buttons/GithubButton"
import { SearchButton } from '../AlgoliaSearch';
import IconLoupe from '../icons/Loupe';
Expand Down Expand Up @@ -100,7 +99,7 @@ export default function NavBar({
useEffect(() => {
setMobileMenuOpen(false);
setOpen(null);
}, [asPath])
}, [asPath]);

return (
<div className={`bg-white ${className} z-50`}>
Expand Down

0 comments on commit 585fed6

Please sign in to comment.