[FIX] Make UserMenu appear on mobile (#991)

fix usermenu being hidden on mobile
This commit is contained in:
Sean Hatfield 2024-03-29 15:18:18 -07:00 committed by GitHub
parent 49f30e051c
commit df054eb8d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

View File

@ -54,7 +54,7 @@ export default function UserButton() {
if (mode === null) return null;
return (
<div className="absolute top-9 right-10 w-fit h-fit z-99">
<div className="absolute top-3 right-4 md:top-9 md:right-10 w-fit h-fit z-99">
<button
ref={buttonRef}
onClick={() => setShowMenu(!showMenu)}

View File

@ -1,12 +1,9 @@
import { isMobile } from "react-device-detect";
import UserButton from "./UserButton";
export default function UserMenu({ children }) {
if (isMobile) return <>{children}</>;
return (
<div className="w-auto h-auto">
<UserButton />
{children}
</div>
);