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) => (