From 5d62356b37c464f6fb91deb7beb62347fd9cdd9c Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sun, 5 Feb 2023 17:47:43 +0100 Subject: [PATCH] link tech and map --- resources/js/components/common/Footer.js | 9 ++++++- resources/js/components/common/Header.js | 33 +++++++++++++++++------- resources/js/i18n/de.js | 6 +++++ resources/js/i18n/en.js | 6 +++++ 4 files changed, 43 insertions(+), 11 deletions(-) diff --git a/resources/js/components/common/Footer.js b/resources/js/components/common/Footer.js index 0ded211..361c1f7 100644 --- a/resources/js/components/common/Footer.js +++ b/resources/js/components/common/Footer.js @@ -46,7 +46,14 @@ const Footer = () => { - ALttP Tech Index + {t('footer.tech')} + + + + + + + {t('footer.map')} diff --git a/resources/js/components/common/Header.js b/resources/js/components/common/Header.js index 6868477..1bb2ce1 100644 --- a/resources/js/components/common/Header.js +++ b/resources/js/components/common/Header.js @@ -2,16 +2,17 @@ import PropTypes from 'prop-types'; import React from 'react'; import { Button, Container, Nav, Navbar } from 'react-bootstrap'; import { LinkContainer } from 'react-router-bootstrap'; -import { withTranslation } from 'react-i18next'; +import { useTranslation } from 'react-i18next'; import Icon from './Icon'; import LanguageSwitcher from './LanguageSwitcher'; import { getAvatarUrl } from '../../helpers/User'; import { withUser } from '../../helpers/UserContext'; -import i18n from '../../i18n'; -const Header = ({ doLogout, user }) => - +const Header = ({ doLogout, user }) => { + const { t } = useTranslation(); + + return @@ -30,7 +31,19 @@ const Header = ({ doLogout, user }) => - + + - -; + ; +}; Header.propTypes = { doLogout: PropTypes.func, @@ -81,4 +94,4 @@ Header.propTypes = { }), }; -export default withTranslation()(withUser(Header)); +export default withUser(Header); diff --git a/resources/js/i18n/de.js b/resources/js/i18n/de.js index f4b73e5..0f7c8ff 100644 --- a/resources/js/i18n/de.js +++ b/resources/js/i18n/de.js @@ -283,10 +283,12 @@ export default { connect: 'Connect Spedruns Discord', contact: 'Wenn du gerne ein Turnier auf dieser Seite organisieren möchtest, wende dich bitte an HolySmoke#5229 im Discord.', info: 'Infos', + map: 'ALttP Karte', privacy: 'Datenschutz', resources: 'Ressourcen', smd: 'Deutscher Super Metroid Discord', smwiki: 'Super Metroid Speedrunning Wiki', + tech: 'ALttP Techniken', }, general: { anonymous: 'Anonym', @@ -385,6 +387,10 @@ export default { uwLong: 'Underworld', uwShort: 'UW', }, + menu: { + map: 'Karte', + tech: 'Techniken', + }, modes: { heading: 'Modi', }, diff --git a/resources/js/i18n/en.js b/resources/js/i18n/en.js index 6498b85..7414796 100644 --- a/resources/js/i18n/en.js +++ b/resources/js/i18n/en.js @@ -283,10 +283,12 @@ export default { connect: 'Connect Spedruns Discord', contact: 'If you would like to organize a Tournament on this site, please contact HolySmoke#5229 on Discord.', info: 'Infos', + map: 'ALttP Map', privacy: 'Privacy', resources: 'Resources', smd: 'German Super Metroid Discord', smwiki: 'Super Metroid Speedrunning Wiki', + tech: 'ALttP Tech', }, general: { anonymous: 'Anonym', @@ -385,6 +387,10 @@ export default { uwLong: 'Underworld', uwShort: 'UW', }, + menu: { + map: 'Map', + tech: 'Tech', + }, modes: { heading: 'Modes', }, -- 2.39.2