Fix misc errors

This commit is contained in:
yude 2021-12-11 19:07:11 +09:00
parent a8321b6c60
commit 1f7456db3c
Signed by: yude
GPG Key ID: EB0FE5D925C4A968
3 changed files with 43 additions and 35 deletions

View File

@ -8,7 +8,7 @@ const Contact = (props) => {
const { icon, dest, caption } = props
return (
<div className="hover:underline">
<Link href={{ pathname: dest, query: query }}>
<Link href={{ pathname: dest }}>
<a>
<FontAwesomeIcon icon={icon} className="w-7 h-7 inline lg:w-10 lg:h-10 md:w-7 md:h-7"/>
<p className="font-mono text-xl">{caption}</p>

View File

@ -17,20 +17,24 @@ export default function HcuNews() {
const { t } = useTranslation();
const [query] = useLanguageQuery();
return(
<Layout title={t('hcunews')}>
<div>
<h1>{t('hcunews')}</h1>
{lang === 'ja' ? (
<ReactMarkdown plugins={[gfm]}>
{ja}
</ReactMarkdown>
) : (
<ReactMarkdown plugins={[gfm]}>
{en}
</ReactMarkdown>
)}
</div>
</Layout>
)
}
if (!query) {
return <p>Loading...</p>
} else {
return (
<Layout title={t('hcunews')}>
<div>
<h1>{t('hcunews')}</h1>
{query["lang"] === 'ja' ? (
<ReactMarkdown plugins={[gfm]}>
{ja}
</ReactMarkdown>
) : (
<ReactMarkdown plugins={[gfm]}>
{en}
</ReactMarkdown>
)}
</div>
</Layout>
)
}
}

View File

@ -17,20 +17,24 @@ import en from '../docs/tos/en.md'
export default function Tos(props) {
const { t } = useTranslation();
const [query] = useLanguageQuery();
return(
<Layout title={t('tos')}>
<div>
{lang === 'ja' ? (
<ReactMarkdown plugins={[gfm]}>
{ja}
</ReactMarkdown>
) : (
<ReactMarkdown plugins={[gfm]}>
{en}
</ReactMarkdown>
)}
</div>
</Layout>
)
}
if (!query) {
return <p>Loading...</p>
} else {
return (
<Layout title={t('tos')}>
<div>
{query["lang"] === 'ja' ? (
<ReactMarkdown plugins={[gfm]}>
{ja}
</ReactMarkdown>
) : (
<ReactMarkdown plugins={[gfm]}>
{en}
</ReactMarkdown>
)}
</div>
</Layout>
)
}
}