"use client"; import React, { useEffect, useRef } from "react"; import gsap from "gsap"; import { ScrollTrigger } from "gsap/ScrollTrigger"; if (typeof window !== "undefined") { gsap.registerPlugin(ScrollTrigger); } export default function CompetitiveEdge() { const sectionRef = useRef(null); const tableWrapperRef = useRef(null); const headerRef = useRef(null); useEffect(() => { const section = sectionRef.current; const tableWrapper = tableWrapperRef.current; const header = headerRef.current; if (!section || !tableWrapper || !header) return; const rows = section.querySelectorAll(".table-row-hover"); const badges = section.querySelectorAll(".yes-badge, .advanced-badge"); // Dynamic initial state settings via GSAP to prevent SSR flash gsap.set([header, tableWrapper], { opacity: 0, y: 45 }); gsap.set(rows, { opacity: 0, y: 20 }); gsap.set(badges, { opacity: 0, scale: 0.8 }); // GSAP Timeline ScrollTrigger for viewport entrances const entryTl = gsap.timeline({ scrollTrigger: { trigger: section, start: "top 78%", toggleActions: "play none none none", } }); entryTl // 1. Reveal Header & Table .to([header, tableWrapper], { opacity: 1, y: 0, duration: 0.95, stagger: 0.15, ease: "power4.out", }) // 2. Stagger slide up row items .to(rows, { opacity: 1, y: 0, duration: 0.75, stagger: 0.05, ease: "power3.out", }, "-=0.6") // 3. Pop checkmarks and badges cleanly .to(badges, { opacity: 1, scale: 1, duration: 0.55, stagger: 0.03, ease: "back.out(1.6)", }, "-=0.45"); }, []); return (
{/* Visual background layers */}
{/* Section Header */}
/ DoorMile wins/

WHERE DOORMILE WINS

A side-by-side technical capabilities comparison showing how operational fleet ownership and dynamic AI planning disrupt basic aggregators.

{/* Comparison Matrix Table (Full width on desktop) */}
Capability Doormile Aggregators Local Couriers Software Platforms
Owned fleet control ✓ Yes No Yes No
Dynamic routing & dispatch ✓ Advanced Basic No Advanced
EV-aware planning ✓ Yes No No No
Documentation & proof trail ✓ Yes Partial No Yes
Real-time tracking ✓ Yes Yes No Yes
Verified handling ✓ Yes Partial No No
Hyperlocal learning ✓ Yes No No No
SLA accountability ✓ High Low Medium Low