import useLocale, { Locales } from '@/utils/useLocale'; import { Html, Head, Main, NextScript, DocumentProps } from 'next/document'; import { useRouter } from 'next/router'; import { LocalesMap } from '@/utils/useLocale'; export const locales: LocalesMap = { ru: { title: 'ridebus - расписание транспорта', description: 'Приложение, которое поможет вам удобно смотреть расписание общественного транспорта', }, en: { title: 'ridebus - public transport schedule', description: 'An app that helps you conveniently view public transportation schedules', }, }; export default function Document(props: DocumentProps) { const locale = props.locale || 'en'; const t = (key: string) => locales[locale as Locales][key] || key; return (
{/* Primary Meta Tags */} {/* Open Graph */} {/* Twitter */}