'use client'; import Image from 'next/image'; import Link from 'next/link'; import { msg } from '@lingui/macro'; import { useLingui } from '@lingui/react'; import { motion, useReducedMotion } from 'framer-motion'; import { FaXTwitter } from 'react-icons/fa6'; import { LiaDiscord } from 'react-icons/lia'; import { LuGithub } from 'react-icons/lu'; import LogoImage from '@documenso/assets/logo.png'; import { Sheet, SheetContent } from '@documenso/ui/primitives/sheet'; export type MobileNavigationProps = { isMenuOpen: boolean; onMenuOpenChange?: (_value: boolean) => void; }; export const MENU_NAVIGATION_LINKS = [ { href: '/pricing', text: msg`Pricing`, }, { href: 'https://documen.so/docs-nav', text: msg`Documentation`, }, { href: '/singleplayer', text: 'Singleplayer', }, { href: '/blog', text: msg`Blog`, }, { href: '/open', text: msg`Open Startup`, }, { href: 'https://status.documenso.com', text: msg`Status`, }, { href: 'mailto:support@documenso.com', text: msg`Support`, target: '_blank', }, { href: '/privacy', text: msg`Privacy`, }, { href: 'https://app.documenso.com/signup?utm_source=marketing-header', text: msg`Sign up`, }, { href: 'https://app.documenso.com/signin?utm_source=marketing-header', text: msg`Sign in`, }, ]; export const MobileNavigation = ({ isMenuOpen, onMenuOpenChange }: MobileNavigationProps) => { const { _ } = useLingui(); const shouldReduceMotion = useReducedMotion(); const handleMenuItemClick = () => { onMenuOpenChange?.(false); }; return ( Documenso Logo {MENU_NAVIGATION_LINKS.map(({ href, text, target }) => ( handleMenuItemClick()} target={target} > {typeof text === 'string' ? text : _(text)} ))}
); };