0
0
mirror of https://github.com/yude-jp/yude.jp synced 2025-10-12 19:28:43 +09:00

Add translation file & base

This commit is contained in:
2021-02-06 14:30:05 +09:00
parent 6baa3817d5
commit 4abd63a771
9 changed files with 49 additions and 414 deletions

View File

@@ -2,13 +2,17 @@ import Layout from "./components/Layout"
import Navbar from "./components/Navbar"
import Link from 'next/link'
import Image from 'next/image'
import useTranslation from 'next-translate/useTranslation'
import { useRouter } from 'next/router'
export default function Index(props) {
const router = useRouter()
const { locale, locales, defaultLocale, pathname } = router
const { t, lang } = useTranslation("index")
const welcome = t('welcome')
const instead_1 = t('instead_1')
const instead_2 = t('instead_2')
return (
<Layout title="ホーム">
@@ -22,9 +26,8 @@ export default function Index(props) {
height = {200}
unoptimized = {true}
/>
<p>🔨 This page is under development. 🔨</p>
<p>For now, please visit <Link href="https://yude.moe"><a>yude.moe</a></Link>.
</p>
<p>🔨 {welcome} 🔨</p>
<p>{instead_1}<Link href="https://yude.moe"><a>yude.moe</a></Link>{instead_2}</p>
</div>
</Layout>