import React from 'react' import type { ReactNode } from 'react' import { Link, useLocation } from 'react-router-dom' import { useLegacyThemePage, usePageContext } from '../shared/pageContext' import { AppLogo } from '../components/common/AppLogo' function PublicHeader() { const { locale, path, copy } = usePageContext() const location = useLocation() const profilePath = path('/profile') const customerSimulationPath = path('/customer-simulation') const isCustomerSimulation = location.pathname.startsWith(customerSimulationPath) const pageCopy = copy.publicLayout const navCopy = locale === 'zh' ? { profile: '美发师主页', templates: '发型参考', simulation: 'AI发型试试看', reviews: '评价' } : pageCopy.nav return ( {navCopy.profile} {navCopy.templates} {navCopy.simulation} {navCopy.reviews} ) } export function PublicLayout({ children, footer = true }: { children: ReactNode; footer?: boolean }) { useLegacyThemePage({ bodyClassName: '', mobileNavStyle: 'classic' }) const { copy } = usePageContext() return ( <> {children} {footer ? ( ) : null} > ) }