Merge pull request 'the translation in the main section has been resolved' (#167) from fix/main-section into develop

Reviewed-on: http://85.143.176.51:3000/free-land/front-end/pulls/167
This commit is contained in:
Daniel Weissmall 2022-10-21 11:41:50 +00:00
commit 472e8c2ea5

View File

@ -2,16 +2,14 @@
/* Imports */ /* Imports */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
import React from "react"; import React from "react";
import {t as nextT} from "i18next"; import { t as nextT } from "i18next";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { SearchBar } from "../../search/SearchBar"; import { SearchBar } from "../../search/SearchBar";
import { formatNumber } from "core/helpers"; import { formatNumber } from "core/helpers";
export default function MainSection() { export default function MainSection() {
const { t, i18n } = useTranslation(); const { t, i18n } = useTranslation();
const amountArticles = 4202020 const amountArticles = 4202020;
return ( return (
<section className="bg-main bg-center bg-cover bg-origin-border bg-no-repeat min-h-[100vh] py-32 px-2 sm:px-6 md:px-6 lg:px-0 items-center flex justify-center "> <section className="bg-main bg-center bg-cover bg-origin-border bg-no-repeat min-h-[100vh] py-32 px-2 sm:px-6 md:px-6 lg:px-0 items-center flex justify-center ">
@ -21,8 +19,14 @@ export default function MainSection() {
</div> </div>
<div className="flex flex-row items-center justify-center space-x-3 pt-2"> <div className="flex flex-row items-center justify-center space-x-3 pt-2">
<div className=" text-2xl text-gray-400">{t("mainPage.search")}</div> <div className=" text-2xl text-gray-400">{t("mainPage.search")}</div>
<div className=" text-3xl text-blue-500">{formatNumber(amountArticles)}</div> <div className=" text-3xl text-blue-500">
<div className=" text-2xl text-gray-400">{nextT("mainPage.article", {count: amountArticles}).toString()}</div> {formatNumber(amountArticles)}
</div>
<div className=" text-2xl text-gray-400">
{nextT("mainPage.article_many", {
count: amountArticles,
}).toString()}
</div>
</div> </div>
<div className="max-w-xl m-auto pt-16 "> <div className="max-w-xl m-auto pt-16 ">
<SearchBar /> <SearchBar />