-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(client): mobile nav lock body scroll
- Loading branch information
Ivo
committed
Apr 21, 2023
1 parent
7a97449
commit 3b4ed6f
Showing
3 changed files
with
22 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { useLockBody } from "@app/hooks/use-lock-body"; | ||
|
||
import { Auth } from "../Auth"; | ||
|
||
interface MobileNavProps { | ||
renderedItems: JSX.Element[]; | ||
} | ||
|
||
export function MobileNav({ renderedItems }: MobileNavProps) { | ||
useLockBody(); | ||
|
||
return ( | ||
<div className="md:hidden absolute inset-0 z-10 top-14 bg-zinc-200/80 backdrop-blur-md p-2 flex flex-col gap-y-4"> | ||
<Auth /> | ||
{renderedItems} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters