quivr/frontend/app/(home)/Features.tsx
Mamadou DICKO b0514d6149
fix(i18n): update tests for french and spanish (#878)
* add libraries for traslation purposes

* Add button and service for language selection

* add spanish translation on login page

* add spanish translation on upload page

* Add spanish translations for explore page

* Add translations on user page

* Add translations for config page

* Add spanish translations on chat page

* add translations for brain page

* fix GUI and save on local storage

* fix (i18n) init and types

* fix (i18n): typos

* add translation on new brain modal

* add translations on metadata

* Add translations on home page

* fixes types

* fix(frontend-tests): use get by id instead of text

---------

Co-authored-by: Gustavo Maciel <gustavo_m13@outlook.com>
2023-08-07 14:13:41 +02:00

77 lines
2.1 KiB
TypeScript

"use client";
import { ReactNode } from "react";
import { useTranslation } from "react-i18next";
import {
GiArtificialIntelligence,
GiBrain,
GiDatabase,
GiFastArrow,
GiLockedDoor,
GiOpenBook,
} from "react-icons/gi";
import Card from "@/lib/components/ui/Card";
const Features = (): JSX.Element => {
const { t } = useTranslation();
return (
<section className="my-20 text-center flex flex-col items-center justify-center gap-10">
<div>
<h1 className="text-5xl font-bold ">{t("features")}</h1>
{/* <h2 className="opacity-50">Change the way you take notes</h2> */}
</div>
<div className="flex flex-wrap gap-5 justify-center">
<Feature
icon={<GiBrain className="text-7xl w-full" />}
title={t("two_brains_title")}
desc={t("two_brains_desc")}
/>
<Feature
icon={<GiDatabase className="text-7xl w-full" />}
title={t("any_kind_of_data_title")}
desc={t("any_kind_of_data_desc")}
/>
<Feature
icon={<GiArtificialIntelligence className="text-7xl w-full" />}
title={t("fast_and_accurate_title")}
desc={t("fast_and_accurate_desc")}
/>
<Feature
icon={<GiFastArrow className="text-7xl w-full" />}
title={t("fast_and_efficient_title")}
desc={t("fast_and_efficient_desc")}
/>
<Feature
icon={<GiLockedDoor className="text-7xl w-full" />}
title={t("secure_title")}
desc={t("secure_desc")}
/>
<Feature
icon={<GiOpenBook className="text-7xl w-full" />}
title={t("open_source_title")}
desc={t("open_source_desc")}
/>
</div>
</section>
);
};
interface FeatureProps {
icon?: ReactNode;
title: string;
desc: string;
}
const Feature = ({ title, desc, icon }: FeatureProps): JSX.Element => {
return (
<Card className="p-10 max-w-xs flex flex-col gap-5 w-full">
{icon}
<h1 className="text-xl font-bold">{title}</h1>
<p>{desc}</p>
</Card>
);
};
export default Features;