From 2ef9e9b5def76c44f3fbf0c6a3d91e6f2a009d85 Mon Sep 17 00:00:00 2001 From: Leander Tolksdorf <leander.tolksdorf@fu-berlin.de> Date: Wed, 8 Dec 2021 16:01:44 +0100 Subject: [PATCH] Add i18n to Home --- client/src/pages/Home.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/pages/Home.tsx b/client/src/pages/Home.tsx index ce8ac00..ac1bca6 100644 --- a/client/src/pages/Home.tsx +++ b/client/src/pages/Home.tsx @@ -1,9 +1,11 @@ import React from "react"; import { Button, Col, Container, Image, Row } from "react-bootstrap"; +import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import logo from "../assets/logo_unisport.png"; function Home() { + const { t, i18n } = useTranslation(); return ( <Container className="h-100"> <Row className="h-100"> @@ -18,7 +20,7 @@ function Home() { variant="primary" className="w-100 mb-2 text-uppercase text-secondary border" > - Book a boat + {t("home.buttonBookBoat")} </Button> </Link> <br /> @@ -27,7 +29,7 @@ function Home() { variant="secondary" className="w-100 mb-2 text-uppercase border" > - Staff Login + {t("home.buttonStaffLogin")} </Button> </Link> </div> -- GitLab