🔨 restore pdf for cgs et cookie policy for now
This commit is contained in:
parent
aad5aebdef
commit
b6875ff609
@ -1,18 +1,21 @@
|
||||
import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography";
|
||||
import DefaultLegalDashboard, { ELegalOptions } from "@Front/Components/LayoutTemplates/DefaultLegalDashboard";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import React from "react";
|
||||
|
||||
import PrivacyPolicy from "./PrivacyPolicy";
|
||||
import LegalNotice from "./LegalNotice";
|
||||
import CGU from "./CGU";
|
||||
import classes from "./classes.module.scss";
|
||||
import LegalNotice from "./LegalNotice";
|
||||
import PrivacyPolicy from "./PrivacyPolicy";
|
||||
|
||||
// const pdfLinks: Record<ELegalOptions, string> = {
|
||||
// "mentions-legales": "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/mentions_legales.pdf",
|
||||
// "politique-de-confidentialite": "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/politique_confidentialite.pdf",
|
||||
// "politique-de-gestion-des-cookies": "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/politique_cookies.pdf",
|
||||
// cgs: "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/cgs.pdf",
|
||||
// cgu: "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/cgu.pdf",
|
||||
// };
|
||||
const pdfLinks: Record<ELegalOptions, string> = {
|
||||
"mentions-legales": "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/mentions_legales.pdf",
|
||||
"politique-de-confidentialite": "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/politique_confidentialite.pdf",
|
||||
"politique-de-gestion-des-cookies": "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/politique_cookies.pdf",
|
||||
cgs: "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/cgs.pdf",
|
||||
cgu: "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/cgu.pdf",
|
||||
};
|
||||
|
||||
export default function LegalInformations() {
|
||||
const router = useRouter();
|
||||
@ -28,11 +31,33 @@ function getLegalInformationContent(legalType: ELegalOptions) {
|
||||
case ELegalOptions.CGU:
|
||||
return <CGU />;
|
||||
case ELegalOptions.CGS:
|
||||
return "CGS";
|
||||
return (
|
||||
<object data={pdfLinks[legalType]} type="application/pdf" width="100%" height="100%" className={classes["pdf-viewer"]}>
|
||||
<Typography typo={ETypo.TEXT_LG_LIGHT} className={classes["no-pdf-text"]}>
|
||||
Votre navigateur ne prend pas en charge l'affichage des pdf
|
||||
<Typography typo={ETypo.TEXT_LG_LIGHT} type="span">
|
||||
<Link href={pdfLinks[legalType]} target="_blank" style={{ color: `var(${ETypoColor.COLOR_PRIMARY_500})` }}>
|
||||
cliquez ici pour télécharger le pdf.
|
||||
</Link>
|
||||
</Typography>
|
||||
</Typography>
|
||||
</object>
|
||||
);
|
||||
case ELegalOptions.POLITIQUE_DE_CONFIDENTIALITE:
|
||||
return <PrivacyPolicy />;
|
||||
case ELegalOptions.POLITIQUE_DE_GESTION_DES_COOKIES:
|
||||
return "Politique de gestion des cookies";
|
||||
return (
|
||||
<object data={pdfLinks[legalType]} type="application/pdf" width="100%" height="100%" className={classes["pdf-viewer"]}>
|
||||
<Typography typo={ETypo.TEXT_LG_LIGHT} className={classes["no-pdf-text"]}>
|
||||
Votre navigateur ne prend pas en charge l'affichage des pdf
|
||||
<Typography typo={ETypo.TEXT_LG_LIGHT} type="span">
|
||||
<Link href={pdfLinks[legalType]} target="_blank" style={{ color: `var(${ETypoColor.COLOR_PRIMARY_500})` }}>
|
||||
cliquez ici pour télécharger le pdf.
|
||||
</Link>
|
||||
</Typography>
|
||||
</Typography>
|
||||
</object>
|
||||
);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user