From 2bc01b5952af18c4152ee0362e6a3bf8bdf692e7 Mon Sep 17 00:00:00 2001 From: Aravind R Date: Fri, 12 Jun 2026 17:07:38 +0530 Subject: [PATCH] update ev section --- next.config.ts | 4 + src/components/sections/EVLogisticSection.tsx | 474 ++++++------------ src/components/sections/WomenSection.tsx | 2 +- 3 files changed, 168 insertions(+), 312 deletions(-) diff --git a/next.config.ts b/next.config.ts index 065027f..e708fa1 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,6 +1,10 @@ import type { NextConfig } from "next"; +import path from "path"; const nextConfig: NextConfig = { + turbopack: { + root: path.resolve(__dirname), + }, output: "export", // Required by the How It Works 3D experience. React StrictMode double-invokes // mount/effects in dev, which tears down and re-creates the WebGL context of diff --git a/src/components/sections/EVLogisticSection.tsx b/src/components/sections/EVLogisticSection.tsx index b163991..84b5b12 100644 --- a/src/components/sections/EVLogisticSection.tsx +++ b/src/components/sections/EVLogisticSection.tsx @@ -1,6 +1,6 @@ "use client"; -import React, { useState, useEffect, useRef } from "react"; +import React, { useEffect, useRef } from "react"; import Image from "next/image"; import gsap from "gsap"; import { ScrollTrigger } from "gsap/ScrollTrigger"; @@ -9,43 +9,61 @@ if (typeof window !== "undefined") { gsap.registerPlugin(ScrollTrigger); } -const ACCORDION_DATA = [ +const CARDS_DATA = [ { index: 1, - num: "01", title: "Battery-First Planning", - desc: "Routes are optimized around battery levels and charging windows, not retrofitted as an afterthought." + desc: "Routes are optimized around battery levels and charging windows, not retrofitted as an afterthought.", + icon: ( + + + + + + + ) }, { index: 2, - num: "02", title: "Energy-Aware Routing", - desc: "Our algorithms factor in terrain, traffic, and payload weight to maximize range efficiency." + desc: "Our algorithms factor in terrain, traffic, and payload weight to maximize range efficiency.", + icon: ( + + + + ) }, { index: 3, - num: "03", title: "Smart Charging Integration", - desc: "Seamless coordination with charging infrastructure to eliminate range anxiety for drivers." + desc: "Seamless coordination with charging infrastructure to eliminate range anxiety for drivers.", + icon: ( + + + + + + + ) }, { index: 4, - num: "04", title: "Carbon Footprint Tracking", - desc: "Real-time emissions monitoring and sustainability reports for every delivery." + desc: "Real-time emissions monitoring and sustainability reports for every delivery.", + icon: ( + + + + + ) } ]; export default function EVLogisticSection() { - const [openIndex, setOpenIndex] = useState(4); // Default to item 4 open to match user's screenshot layout const containerRef = useRef(null); const imageWrapperRef = useRef(null); const imageRef = useRef(null); - const toggleAccordion = (index: number) => { - setOpenIndex((prev) => (prev === index ? null : index)); - }; - useEffect(() => { const container = containerRef.current; const img = imageRef.current; @@ -85,7 +103,7 @@ export default function EVLogisticSection() { stagger: 0.02, // Rapid letter-by-letter wave reveal! ease: "power4.out", }, "-=0.45") - .to(container.querySelectorAll(".ev-logistic-accordion-item"), { + .to(container.querySelectorAll(".ev-feature-card"), { opacity: 1, y: 0, duration: 0.6, @@ -113,14 +131,14 @@ export default function EVLogisticSection() { return ( <>