MAJ gestion des pages services
This commit is contained in:
@@ -27,18 +27,46 @@ const ServiceCinq = () => {
|
||||
return <p>Chargement...</p>;
|
||||
}
|
||||
|
||||
const getStoredValue = (key) =>
|
||||
typeof window !== "undefined" ? window.localStorage.getItem(key) : null;
|
||||
|
||||
const storedHeroBackground = getStoredValue(`hero_bg_${pageId}`);
|
||||
const storedHeroImage = getStoredValue(`hero_img_${pageId}`);
|
||||
|
||||
const heroBackground =
|
||||
acfData?.hero_background ||
|
||||
acfData?.background_hero ||
|
||||
acfData?.hero_bg ||
|
||||
storedHeroBackground ||
|
||||
"linear-gradient(135deg, #050d1f 0%, #02050d 85%)";
|
||||
|
||||
const heroImage =
|
||||
acfData?.hero_background_image ||
|
||||
acfData?.hero_background_image_url ||
|
||||
acfData?.hero_image_url ||
|
||||
acfData?.hero_image ||
|
||||
acfData?.image_hero ||
|
||||
acfData?.img_hero_url ||
|
||||
acfData?.img_hero ||
|
||||
storedHeroImage ||
|
||||
"https://picsum.photos/id/1026/1920/1080.webp";
|
||||
|
||||
const serviceDetails = {
|
||||
// Hero
|
||||
title: acfData?.titre_principal_tce || "Titre héros !", // ✅ Modifiable individuellement
|
||||
subtitle: <span dangerouslySetInnerHTML={{ __html: acfData?.description_principal_tce || "Description, héros" }} />,
|
||||
subtitle:
|
||||
acfData?.description_principal_tce ||
|
||||
"<p>Description, héros</p>",
|
||||
|
||||
image: "https://picsum.photos/id/1026/1920/1080.webp",
|
||||
image: heroImage,
|
||||
heroBackground,
|
||||
ctaText: "En savoir plus",
|
||||
ctaLink: "/contact",
|
||||
|
||||
// section 1
|
||||
interestTitle: acfData?.second_titre_tce || "Titre interet", // ✅ Modifiable individuellement
|
||||
description: <span dangerouslySetInnerHTML={{ __html: acfData?.second_description_tce || "Description interet" }} />,
|
||||
description:
|
||||
acfData?.second_description_tce || "<p>Description interet</p>",
|
||||
// section 2
|
||||
desirTitle: "Titre", // ✅ Modifiable individuellement
|
||||
|
||||
|
||||
Reference in New Issue
Block a user