From bc51f1b761763ca585f225190e7d859e0cd03209 Mon Sep 17 00:00:00 2001 From: Baoyuan Date: Fri, 16 Jul 2021 23:02:03 +0800 Subject: [Issue #49] feat: add i18n (#58) * feat: add i18n * fix: code clean --- src/App.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/App.js') diff --git a/src/App.js b/src/App.js index 3832de1..1b97aec 100644 --- a/src/App.js +++ b/src/App.js @@ -1,25 +1,32 @@ import React from 'react'; +import { useTranslation } from 'react-i18next'; import { Card } from './components/Card'; import './style.css'; import logo from '../src/images/wifi.png'; function App() { + const { t, i18n } = useTranslation(); + return (

icon -   WiFi Card +   {t('title')}

-

- Print a simple card with your WiFi login details. Tape it to the fridge, - keep it in your wallet, etc. -

+
+ + +
+ +

{t('desc.use')}

- Your WiFi information is never sent to the server. No tracking, - analytics, or fingerprinting are used on this website. View the{' '} - source code. + {t('desc.privacy')}{' '} + {t('desc.source')}.

-- cgit v1.2.3