mirror of
https://github.com/yude-jp/yude.jp
synced 2024-12-22 20:20:09 +09:00
Add comments and SEO, Code organization
This commit is contained in:
parent
3802286327
commit
efb5e34b90
@ -1,25 +1,41 @@
|
|||||||
|
// Base layout
|
||||||
import Layout from "./components/Layout"
|
import Layout from "./components/Layout"
|
||||||
|
|
||||||
|
// i18n
|
||||||
import useTranslation from 'next-translate/useTranslation'
|
import useTranslation from 'next-translate/useTranslation'
|
||||||
|
|
||||||
|
// React Router etc.
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import React from "react"
|
import React from "react"
|
||||||
|
|
||||||
|
// React Markdown
|
||||||
import ReactMarkdown from "react-markdown"
|
import ReactMarkdown from "react-markdown"
|
||||||
import gfm from 'remark-gfm';
|
import gfm from 'remark-gfm';
|
||||||
import ja from '../docs/mutual/ja.md'
|
import ja from '../docs/mutual/ja.md'
|
||||||
import en from '../docs/mutual/en.md'
|
import en from '../docs/mutual/en.md'
|
||||||
|
|
||||||
|
// next-seo
|
||||||
|
import { NextSeo } from 'next-seo';
|
||||||
|
|
||||||
export default function Tos(props) {
|
export default function Tos(props) {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { locale, locales, defaultLocale, pathname } = router
|
const { locale, locales, defaultLocale, pathname } = router
|
||||||
const { t, lang } = useTranslation("common")
|
const { t, lang } = useTranslation("common")
|
||||||
return(
|
return(
|
||||||
<Layout title={t('common:mutual')}>
|
<>
|
||||||
<div>
|
<NextSeo
|
||||||
{lang === 'ja' ? (
|
title="相互リンク"
|
||||||
<ReactMarkdown plugins={[gfm]} children={ja} />
|
description="yude.jp と相互にリンクを貼っている Web サイトの一覧"
|
||||||
) : (
|
/>
|
||||||
<ReactMarkdown plugins={[gfm]} children={en} />
|
<Layout title={t('common:mutual')}>
|
||||||
)}
|
<div>
|
||||||
</div>
|
{lang === 'ja' ? (
|
||||||
</Layout>
|
<ReactMarkdown plugins={[gfm]} children={ja} />
|
||||||
|
) : (
|
||||||
|
<ReactMarkdown plugins={[gfm]} children={en} />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</Layout>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user