From a72a778a033507fc1d5d8f5ce954fc4926697a07 Mon Sep 17 00:00:00 2001 From: yude Date: Sat, 11 Dec 2021 18:17:20 +0900 Subject: [PATCH] WIP --- i18n/translations.en.json | 2 +- pages/components/Footer/Footer.js | 8 +++++++- pages/components/Navbar.js | 11 +++++++++++ pages/hcunews.js | 5 ++--- pages/index.js | 5 +++-- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/i18n/translations.en.json b/i18n/translations.en.json index 63b6335..147d8ef 100644 --- a/i18n/translations.en.json +++ b/i18n/translations.en.json @@ -10,7 +10,7 @@ "mutual": "Mutual links", "status": "Service Status", "icon_1": "Icon: ", - "icon_2": "", + "icon_2": " ", "post_list": "Posts listing", "hcunews": "About @hcunews", "house": "yude's house", diff --git a/pages/components/Footer/Footer.js b/pages/components/Footer/Footer.js index 7ff65af..63124a6 100644 --- a/pages/components/Footer/Footer.js +++ b/pages/components/Footer/Footer.js @@ -1,9 +1,15 @@ +// Tailwind CSS import "tailwindcss/tailwind.css"; + +// Next.js import Link from 'next/link'; + // i18n -import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n'; +import { useTranslation, useLanguageQuery } from 'next-export-i18n'; export default function Footer(props) { + const { t } = useTranslation(); + const [query] = useLanguageQuery(); return ( <>
diff --git a/pages/components/Navbar.js b/pages/components/Navbar.js index dd8c912..0c3804f 100644 --- a/pages/components/Navbar.js +++ b/pages/components/Navbar.js @@ -1,9 +1,20 @@ +// Tailwind CSS import "tailwindcss/tailwind.css"; + +// Next.js import Link from 'next/link'; + +// Components import LangSelector from "./LangSelector" import ThemeSelector from "./ThemeSelector" +// i18n +import { useTranslation, useLanguageQuery, LanguageSwitcher } from 'next-export-i18n'; + const Navbar = () => { + const { t } = useTranslation(); + const [query] = useLanguageQuery(); + return ( <>
{/* Avatar by */} -

{t('common:icon_1')}梨留りる {t('common:icon_2')}

+

{t('icon_1')}梨留りる {t('icon_2')}