'use client' import { useLocale } from 'next-intl' import { useRouter, usePathname } from '@/i18n/routing' import { ChangeEvent } from 'react' import { cn } from '@/lib/utils' import { Globe } from 'lucide-react' export default function LocaleSwitcher({ scrolled }: { scrolled: boolean }) { const locale = useLocale() const router = useRouter() const pathname = usePathname() const onSelectChange = (e: ChangeEvent) => { const nextLocale = e.target.value router.replace({ pathname }, { locale: nextLocale as any }) } return (
) }