/* Superior Car Rental — Fleet listing + Car detail screens */ /* ========================= FLEET LISTING ========================= */ const FleetScreen = ({ navigate, initialCat = "all" }) => { const [cat, setCat] = useState(initialCat); const [brand, setBrand] = useState("all"); const [priceBand, setPriceBand] = useState("all"); const [sort, setSort] = useState("featured"); useEffect(() => { window.scrollTo(0, 0); }, []); const filtered = useMemo(() => { let arr = SCR_DATA.FLEET.slice(); if (cat !== "all") arr = arr.filter(c => c.cat === cat); if (brand !== "all") arr = arr.filter(c => c.make === brand); if (priceBand !== "all") { const [lo, hi] = priceBand.split("-").map(Number); arr = arr.filter(c => c.fromRate >= lo && c.fromRate <= (hi||Infinity)); } if (sort === "price-asc") arr.sort((a,b) => a.fromRate - b.fromRate); else if (sort === "price-desc") arr.sort((a,b) => b.fromRate - a.fromRate); else if (sort === "newest") arr.sort((a,b) => b.year - a.year); else arr.sort((a,b) => (b.featured?1:0) - (a.featured?1:0)); return arr; }, [cat, brand, priceBand, sort]); return (
{/* Page header */}
The fleet

{filtered.length} cars,
ready to drive.

Filter by body, brand, or budget. Every car ships with free delivery in Dubai & UAE. Rates shown are indicative — confirm at booking.
{/* Filter bar */}
{SCR_DATA.CATEGORIES.map(c => ( ))}
{/* Grid */}
{filtered.length === 0 ? (
No cars match your filters yet — try widening the brand or price.
) : (
{filtered.map(c => ( navigate({name:"car", id: c.id})}/> ))}
)}
); }; /* ========================= CAR DETAIL ========================= */ const CarDetailScreen = ({ navigate, carId, onReserve }) => { const car = useMemo(() => SCR_DATA.FLEET.find(c => c.id === carId), [carId]); const [pickupDate, setPickupDate] = useState(todayPlus(1)); const [returnDate, setReturnDate] = useState(todayPlus(4)); const [pickupLoc, setPickupLoc] = useState("dxb"); const [fav, setFav] = useState(false); useEffect(() => { window.scrollTo(0, 0); }, [carId]); if (!car) return null; const days = Math.max(1, Math.round((new Date(returnDate) - new Date(pickupDate)) / 86400000)); const subtotal = car.fromRate * days; const delivery = 0; const total = subtotal + delivery; const similar = SCR_DATA.FLEET.filter(c => c.cat === car.cat && c.id !== car.id).slice(0, 3); const reserveMsg = `Hi Superior Rental, I'd like to reserve the ${car.year} ${car.make} ${car.model}.\nPickup: ${fmtDate(pickupDate)} from ${SCR_DATA.PICKUP_LOCATIONS.find(p=>p.id===pickupLoc)?.label}\nReturn: ${fmtDate(returnDate)}\n(${days} days)`; return (
{/* Hero image */}
{`${car.make}
{/* Title block */}
{car.cat.toUpperCase()} · {car.body} SCR-{car.id.slice(-4).toUpperCase()}

{car.make}

· {car.year}

{car.model}

{car.blurb}

{/* Price card */}
From — indicative
AED {SCR_DATA.formatAED(car.fromRate)} / day
Deposit
AED {SCR_DATA.formatAED(car.deposit)}
Mileage
{car.mileageCap}
Min. rental
{car.minDays} day
Delivery
Free in UAE
Rates vary by season & duration. Final quote at booking includes Salik, fuel deposit, and any add-ons (chauffeur, child seat, additional driver).
{/* Body */}
{/* Left column */}
{/* Specs */}

01Specification

Engine{car.engine}
Power{car.power}
0–100 km/h{car.zeroTo}
Top speed{car.topSpeed}
Transmission{car.transmission}
Drivetrain{car.drivetrain}
Seats / Doors{car.seats} / {car.doors}
Fuel{car.fuel}
Year{car.year}
Exterior{car.color}
Spec values are indicative of the typical configuration of this model. Individual vehicles may vary — confirm at booking.
{/* Features */}

02Features & equipment

    {car.features.map((f, i) =>
  • {f}
  • )}
{/* Gallery (use same image with overlays — placeholders flagging "client to supply") */}

03Gallery · additional angles to follow

{/* Rental terms / requirements */}

04What you'll need

Driver requirements

Valid UAE driving licence — or, for visitors, your home licence plus an International Driving Permit. Exact age & document specifics confirmed at booking.

Deposit & mileage

Refundable security deposit of AED {SCR_DATA.formatAED(car.deposit)} on this car (varies by model). Daily mileage cap {car.mileageCap}. Extra distance billed at pickup rate.

Free delivery, UAE-wide

We bring the car to your hotel, residence, DXB curbside or any address in the UAE — at no extra cost.

24/7 concierge

Lost the key at the beach? Salik gate trouble? One WhatsApp number — answered at any hour. +971 56 767 1411.

{/* Right column — booking */}
Check availability
STEP 1 / 3
setPickupDate(e.target.value)} />
setReturnDate(e.target.value)} />
{SCR_DATA.formatAED(car.fromRate)} × {days} day{days>1?"s":""} {SCR_DATA.formatAED(subtotal)}
Free delivery Included
Refundable deposit {SCR_DATA.formatAED(car.deposit)}
Indicative total {SCR_DATA.formatAED(total)}
Final quote at booking · Salik & fuel deposit additional
No card charged until confirmed
Free cancellation 24h before pickup
Insurance & CDW included
{/* Similar cars */} {similar.length > 0 && (
You might also like

Other {car.body.toLowerCase()}s in the fleet

{similar.map(c => navigate({name:"car", id: c.id})}/>)}
)}
); }; /* Placeholder for missing gallery shots */ const PlaceholderShot = ({ label }) => (
[ client to supply ]
{label}
); Object.assign(window, { FleetScreen, CarDetailScreen, PlaceholderShot });