From caefb48d4cb0bbc2cda95e1505a9f02674308d5b Mon Sep 17 00:00:00 2001 From: Alaguraj0361 Date: Thu, 14 Aug 2025 16:53:50 +0530 Subject: [PATCH] home page tab services section updated --- components/ServiceSectionS2/ServiceSectionS2.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/ServiceSectionS2/ServiceSectionS2.js b/components/ServiceSectionS2/ServiceSectionS2.js index b6413c3..946fc73 100644 --- a/components/ServiceSectionS2/ServiceSectionS2.js +++ b/components/ServiceSectionS2/ServiceSectionS2.js @@ -4,13 +4,14 @@ import classnames from "classnames"; import Link from "next/link"; import Image from "next/image"; import { TabServices } from "../../utils/constant.utils"; // JSON array +import Campaign from "../../api/campaign"; const ClickHandler = () => { window.scrollTo(10, 0); }; // Extract unique categories from the JSON dynamically -const categories = [...new Set(TabServices.map((service) => service.category))]; +const categories = [...new Set(Campaign.map((service) => service.category))]; const ServiceSectionS2 = () => { const [activeTab, setActiveTab] = useState(categories[0]); @@ -42,7 +43,7 @@ const ServiceSectionS2 = () => { {categories.map((cat, idx) => ( - {TabServices.filter((srv) => srv.category === cat).map( + {Campaign.filter((srv) => srv.category === cat).slice(0,3).map( (service, srvIdx) => (