0
0
mirror of https://github.com/yude-jp/yude.jp synced 2025-10-13 03:38:36 +09:00

Preferable language switch on ToS page

This commit is contained in:
2021-05-27 10:26:11 +09:00
parent 12408fbc52
commit 2e4456cb91
5 changed files with 30 additions and 24 deletions

View File

@@ -4,7 +4,8 @@ import { useRouter } from 'next/router'
import React from "react"
import ReactMarkdown from "react-markdown"
import gfm from 'remark-gfm';
import input from '../docs/tos.md'
import ja from '../docs/tos/ja.md'
import en from '../docs/tos/en.md'
export default function Tos(props) {
const router = useRouter()
@@ -14,7 +15,11 @@ export default function Tos(props) {
return(
<Layout title={tos}>
<div>
<ReactMarkdown plugins={[gfm]} children={input} />
{lang === 'ja' ? (
<ReactMarkdown plugins={[gfm]} children={ja} />
) : (
<ReactMarkdown plugins={[gfm]} children={en} />
)}
</div>
</Layout>
)