quivr/frontend/lib/components/ui/PageHeading.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

28 lines
606 B
TypeScript

interface PageHeadingProps {
title: string;
subtitle?: string;
}
const PageHeading = ({ title, subtitle }: PageHeadingProps): JSX.Element => {
return (
<div className="flex flex-col items-center justify-center px-5">
<h1
data-testid="page-heading-title"
className="text-3xl font-bold text-center"
>
{title}
</h1>
{subtitle !== undefined && (
<h2
data-testid="page-heading-subtitle"
className="opacity-50 text-center"
>
{subtitle}
</h2>
)}
</div>
);
};
export default PageHeading;