🔨 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 DefaultLegalDashboard, { ELegalOptions } from "@Front/Components/LayoutTemplates/DefaultLegalDashboard";
|
||||||
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
import PrivacyPolicy from "./PrivacyPolicy";
|
|
||||||
import LegalNotice from "./LegalNotice";
|
|
||||||
import CGU from "./CGU";
|
import CGU from "./CGU";
|
||||||
|
import classes from "./classes.module.scss";
|
||||||
|
import LegalNotice from "./LegalNotice";
|
||||||
|
import PrivacyPolicy from "./PrivacyPolicy";
|
||||||
|
|
||||||
// const pdfLinks: Record<ELegalOptions, string> = {
|
const pdfLinks: Record<ELegalOptions, string> = {
|
||||||
// "mentions-legales": "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/mentions_legales.pdf",
|
"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-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",
|
"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",
|
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",
|
cgu: "https://s3.fr-par.scw.cloud/lecoffre.io-bucket/footer/cgu.pdf",
|
||||||
// };
|
};
|
||||||
|
|
||||||
export default function LegalInformations() {
|
export default function LegalInformations() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -28,11 +31,33 @@ function getLegalInformationContent(legalType: ELegalOptions) {
|
|||||||
case ELegalOptions.CGU:
|
case ELegalOptions.CGU:
|
||||||
return <CGU />;
|
return <CGU />;
|
||||||
case ELegalOptions.CGS:
|
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:
|
case ELegalOptions.POLITIQUE_DE_CONFIDENTIALITE:
|
||||||
return <PrivacyPolicy />;
|
return <PrivacyPolicy />;
|
||||||
case ELegalOptions.POLITIQUE_DE_GESTION_DES_COOKIES:
|
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:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user