update content
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type { TranslationKey } from '@/i18n/ui'
|
||||
import { useTranslations } from '@/i18n/utils'
|
||||
import { cn } from '@/libs/cn'
|
||||
import React, { useState, useEffect, type ButtonHTMLAttributes } from 'react'
|
||||
@@ -11,7 +12,7 @@ type AnimatedBurgerButtonProps = ButtonHTMLAttributes<unknown> & {
|
||||
const AnimatedBurgerButton: React.FC<AnimatedBurgerButtonProps> = ({ isOpen, ...buttonProps }) => (
|
||||
<button
|
||||
{...buttonProps}
|
||||
className="fixed right-4 top-4 z-[60] flex h-8 w-8 cursor-pointer flex-col justify-around border-none bg-transparent p-0 focus:outline-none"
|
||||
className="z-[60] flex h-8 w-8 cursor-pointer flex-col justify-around border-none bg-transparent p-0 focus:outline-none"
|
||||
aria-label={isOpen ? 'Close menu' : 'Open menu'}
|
||||
aria-expanded={isOpen}
|
||||
>
|
||||
@@ -66,14 +67,14 @@ const MobileNavigation: React.FC<MobileNavigationProps> = ({ navItems }) => {
|
||||
<AnimatedBurgerButton isOpen={isOpen} onClick={toggleMenu} />
|
||||
<div
|
||||
className={cn(
|
||||
'fixed left-0 top-0 z-50 h-[100dvh] w-full transform bg-bg-main p-8 pt-16 transition-transform duration-300 ease-in-out',
|
||||
'fixed left-0 top-[var(--header-height)] z-50 h-[calc(100dvh-var(--header-height))] w-full transform bg-bg-main p-8 pt-16 transition-transform duration-300 ease-in-out',
|
||||
isOpen ? '-translate-x-0' : 'translate-x-full'
|
||||
)}
|
||||
>
|
||||
<nav className="flex h-full flex-col justify-between">
|
||||
{navItems.map((item) => (
|
||||
<a key={item.key} href={item.href} className="text-3xl" onClick={toggleMenu}>
|
||||
{t(item.key as any)}
|
||||
{t(item.key as TranslationKey)}
|
||||
</a>
|
||||
))}
|
||||
<hr />
|
||||
|
||||
Reference in New Issue
Block a user