infoalloggi-monorepo/apps/infoalloggi/src/pages/privacy-policy.tsx

34 lines
982 B
TypeScript
Raw Normal View History

2025-08-04 17:45:44 +02:00
import Head from "next/head";
import type { NextPage } from "next";
import { useTranslation } from "~/providers/I18nProvider";
import { api } from "~/utils/api";
import type { TestiEStringheStingaId } from "~/schemas/public/TestiEStringhe";
const PrivacyPolicy: NextPage = () => {
const { t, locale } = useTranslation();
const key = (
locale == "en" ? "PRIVACY_POLICY_ENG" : "PRIVACY_POLICY"
) as TestiEStringheStingaId;
const { data } = api.settings.getStringa.useQuery({
stringaId: key,
});
return (
<>
<Head>
<title>{t.privacy_policy_title}</title>
<meta name="description" content={t.privacy_policy_desc} />
</Head>
<div className="mx-auto flex h-full items-center justify-center p-4">
{data && (
<div
className="prose max-w-5xl"
dangerouslySetInnerHTML={{ __html: data.stringa_value || "" }}
/>
)}
</div>
</>
);
};
export default PrivacyPolicy;