mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 03:29:25 +01:00
- Add i18next, react-i18next, i18next-browser-languagedetector packages - Configure i18n initialization with language detector in lib/i18n.ts - Created en/de translation files and moved most hard-coded strings into the files and translated them - Uses locale-aware date formatting where applicable - Added language-specific Wikipedia content files (wikipedia.en.json, wikipedia.de.json) and updated download URLs - Added NOMAD_REPO_URL env variable for fork-friendly URL resolution (easier testing and rollout independent of Crosstalk repo)
25 lines
853 B
TypeScript
25 lines
853 B
TypeScript
import { Link } from '@inertiajs/react'
|
|
import { IconArrowLeft } from '@tabler/icons-react'
|
|
import classNames from '~/lib/classNames'
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
interface BackToHomeHeaderProps {
|
|
className?: string
|
|
children?: React.ReactNode
|
|
}
|
|
|
|
export default function BackToHomeHeader({ className, children }: BackToHomeHeaderProps) {
|
|
const { t } = useTranslation()
|
|
return (
|
|
<div className={classNames('flex border-b border-border-subtle p-4', className)}>
|
|
<div className="justify-self-start">
|
|
<Link href="/home" className="flex items-center">
|
|
<IconArrowLeft className="mr-2" size={24} />
|
|
<p className="text-lg text-text-secondary">{t('common.backToHome')}</p>
|
|
</Link>
|
|
</div>
|
|
<div className="flex-grow flex flex-col justify-center">{children}</div>
|
|
</div>
|
|
)
|
|
}
|