diff --git a/frontend/src/components/ServicePageTemplate.jsx b/frontend/src/components/ServicePageTemplate.jsx
index f7624a0..6a0faf4 100644
--- a/frontend/src/components/ServicePageTemplate.jsx
+++ b/frontend/src/components/ServicePageTemplate.jsx
@@ -15,6 +15,7 @@ import { Navigation, Pagination, Autoplay } from "swiper/modules";
import "swiper/css";
import "swiper/css/navigation";
import "swiper/css/pagination";
+import { useIsTouchDevice } from "./hooks/useIsTouchDevice"; // Import du hook
const ServicePageTemplate = ({
title,
@@ -28,6 +29,7 @@ const ServicePageTemplate = ({
}) => {
const [openModal, setOpenModal] = useState(false);
const [modalContent, setModalContent] = useState({});
+ const isTouchDevice = useIsTouchDevice(); // Détection des écrans tactiles
const handleCardClick = (feature) => {
setModalContent({
@@ -66,25 +68,18 @@ const ServicePageTemplate = ({
}}
>
-
{title}
-
-
+
{subtitle}
-
-
- {/* Carousel Section */}
- {carouselItems && carouselItems.length > 0 && (
-
-
- Découvrez nos réalisations
-
-
-
- {carouselItems.map((item, index) => (
-
-
-
-
-
- {item.title}
-
- {item.description}
-
-
-
- ))}
-
-
- )}
-
- {/* Section Action */}
-
-
- Prêt à démarrer ?
-
-
-
- Rejoignez-nous dès aujourd’hui et profitez de nos services pour
- booster votre activité.
-
-
-
);
};
-export default ServicePageTemplate;
+export default ServicePageTemplate;
\ No newline at end of file
diff --git a/frontend/src/components/hooks/useIsTouchDevice.jsx b/frontend/src/components/hooks/useIsTouchDevice.jsx
new file mode 100644
index 0000000..f900794
--- /dev/null
+++ b/frontend/src/components/hooks/useIsTouchDevice.jsx
@@ -0,0 +1,14 @@
+import { useEffect, useState } from "react";
+
+export const useIsTouchDevice = () => {
+ const [isTouchDevice, setIsTouchDevice] = useState(false);
+
+ useEffect(() => {
+ const checkTouchDevice = () => {
+ setIsTouchDevice("ontouchstart" in window || navigator.maxTouchPoints > 0);
+ };
+ checkTouchDevice();
+ }, []);
+
+ return isTouchDevice;
+};
\ No newline at end of file