diff options
Diffstat (limited to 'src/App.js')
| -rw-r--r-- | src/App.js | 23 |
1 files changed, 15 insertions, 8 deletions
| @@ -1,25 +1,32 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { useTranslation } from 'react-i18next'; | ||
| 2 | import { Card } from './components/Card'; | 3 | import { Card } from './components/Card'; |
| 3 | import './style.css'; | 4 | import './style.css'; |
| 4 | import logo from '../src/images/wifi.png'; | 5 | import logo from '../src/images/wifi.png'; |
| 5 | 6 | ||
| 6 | function App() { | 7 | function App() { |
| 8 | const { t, i18n } = useTranslation(); | ||
| 9 | |||
| 7 | return ( | 10 | return ( |
| 8 | <div className="App"> | 11 | <div className="App"> |
| 9 | <h1> | 12 | <h1> |
| 10 | <img alt="icon" src={logo} width="32" height="32" /> | 13 | <img alt="icon" src={logo} width="32" height="32" /> |
| 11 | WiFi Card | 14 | {t('title')} |
| 12 | </h1> | 15 | </h1> |
| 13 | 16 | ||
| 14 | <p className="tag"> | 17 | <div> |
| 15 | Print a simple card with your WiFi login details. Tape it to the fridge, | 18 | <label>{t('select')}</label> |
| 16 | keep it in your wallet, etc. | 19 | <select onChange={(e) => i18n.changeLanguage(e.target.value)}> |
| 17 | </p> | 20 | <option value="en-US">en-US</option> |
| 21 | <option value="简体中文">简体中文</option> | ||
| 22 | </select> | ||
| 23 | </div> | ||
| 24 | |||
| 25 | <p className="tag">{t('desc.use')}</p> | ||
| 18 | 26 | ||
| 19 | <p className="tag"> | 27 | <p className="tag"> |
| 20 | Your WiFi information is never sent to the server. No tracking, | 28 | {t('desc.privacy')}{' '} |
| 21 | analytics, or fingerprinting are used on this website. View the{' '} | 29 | <a href="https://github.com/bndw/wifi-card">{t('desc.source')}</a>. |
| 22 | <a href="https://github.com/bndw/wifi-card">source code</a>. | ||
| 23 | </p> | 30 | </p> |
| 24 | 31 | ||
| 25 | <Card /> | 32 | <Card /> |
