import { useMemo, useState } from "react"; import { heroImageSources, routes, type Route, WHATSAPP_NUMBER, } from "./data/routes"; import BookingModal from "./components/BookingModal"; import ImageWithFallback from "./components/ImageWithFallback"; export default function App() { const [selectedRoute, setSelectedRoute] = useState(null); const [searchFrom, setSearchFrom] = useState(""); const [searchTo, setSearchTo] = useState(""); const [searchDate, setSearchDate] = useState(""); const [submitted, setSubmitted] = useState(false); // Combine all origins AND destinations so every city in every route appears in both dropdowns const allCities = useMemo(() => { const set = new Set(); routes.forEach((r) => { set.add(r.from); set.add(r.to); if (r.via) { r.via.split("/").forEach((v) => set.add(v.trim())); } }); return Array.from(set).sort(); }, []); const allFroms = allCities; const allTos = allCities; const filtered = useMemo(() => { if (!submitted) return routes; const matchesCity = (route: Route, city: string) => { const c = city.toLowerCase(); if (route.from.toLowerCase() === c) return true; if (route.to.toLowerCase() === c) return true; if (route.via && route.via.toLowerCase().includes(c)) return true; return false; }; return routes.filter( (r) => (!searchFrom || matchesCity(r, searchFrom)) && (!searchTo || matchesCity(r, searchTo)) ); }, [searchFrom, searchTo, submitted]); const onSearch = (e: React.FormEvent) => { e.preventDefault(); setSubmitted(true); document .getElementById("routes") ?.scrollIntoView({ behavior: "smooth", block: "start" }); }; const clearSearch = () => { setSearchFrom(""); setSearchTo(""); setSearchDate(""); setSubmitted(false); }; return (
{/* Navbar */}
A
ABUYA BUS
Modern Coach Services
{/* Hero */}
πŸ‡°πŸ‡ͺ Kenya's Northern Frontier Specialists

Travel in Style with{" "} Abuya Bus

Reliable, comfortable, and modern coach services connecting Nairobi to Moyale, Marsabit, Isiolo, Mwingi, Bura, Hola, Busia and beyond.

⭐ 4.8 / 5 rating
🚌 18+ daily routes
πŸ›‘οΈ Licensed & Insured
{/* Search bar */}
setSearchDate(e.target.value)} className="mt-1 w-full rounded-lg border-2 border-slate-200 focus:border-red-500 outline-none px-3 py-2.5" />
{submitted && ( )}
{/* Routes */}

{submitted ? "Search Results" : "Our Routes & Fares"}

{submitted ? `${filtered.length} route${filtered.length === 1 ? "" : "s"} found` : "Choose your destination and book your seat instantly."}

Need help? Chat with us β†’
{filtered.length === 0 ? (
πŸ€”

No routes match your search

Try clearing the filters or contact us on WhatsApp.

) : (
{filtered.map((r) => ( setSelectedRoute(r)} /> ))}
)}
{/* Fleet showcase */}

Meet Our Modern Fleet

Powered by Scania, our buses are built for long-distance comfort, safety and reliability across Kenya's toughest routes.

{[ { img: "/images/abuya-hero.jpg", title: "Abuya Master Scania", desc: "Flagship Nairobi–Moyale luxury coach with VIP recliner seats.", }, { img: "/images/bus-blue.jpg", title: "Abuya Modern Express", desc: "Premium long-distance coach with onboard entertainment.", }, { img: "/images/bus-night.jpg", title: "Abuya Night Cruiser", desc: "Overnight services with reclining seats and LED comfort lighting.", }, { img: "/images/bus-red.jpg", title: "Abuya Highway Master", desc: "Three-axle Scania for the toughest northern Kenya highways.", }, { img: "/images/bus-brown.jpg", title: "Abuya Royal", desc: "Elegant gold-trimmed coach for premium travelers.", }, { img: "/images/bus-mombasa.jpg", title: "Abuya Coastal Link", desc: "Connecting Mwingi, Bura, Hola and the eastern coast.", }, ].map((b) => (
{b.title}

{b.title}

{b.desc}

))}
{/* Why Us */}

Why Travel with Abuya?

Six reasons thousands of travelers choose us every week.

{[ { img: "/images/bus-red.jpg", icon: "πŸ›‘οΈ", title: "Safety First", desc: "Trained drivers, regular maintenance and full insurance coverage.", }, { img: "/images/bus-blue.jpg", icon: "πŸ’Ί", title: "VIP Comfort", desc: "Reclining seats, AC, USB charging and onboard refreshments.", }, { img: "/images/bus-night.jpg", icon: "πŸ•", title: "Punctual Departures", desc: "We run on time β€” every day, every route, every season.", }, { img: "/images/bus-brown.jpg", icon: "πŸ’°", title: "Best Fares", desc: "Honest, transparent pricing β€” no hidden booking charges.", }, { img: "/images/bus-mombasa.jpg", icon: "πŸ“ž", title: "24/7 Support", desc: "Talk to a real person any time, day or night, on WhatsApp.", }, { img: "/images/abuya-hero.jpg", icon: "🌍", title: "Wide Network", desc: "From Nairobi to Moyale, we cover Kenya's most remote routes.", }, ].map((f) => (
{f.title}
{f.icon}

{f.title}

{f.desc}

))}
{/* Contact */}

Book on WhatsApp Now

Our booking team is online 24/7 to confirm your seat, share M-Pesa payment details and answer any questions about your journey.

πŸ“ž Phone / WhatsApp:{" "} 0756 908 988
βœ‰οΈ Email:{" "} abuyamodernb@gmail.com
πŸ“ Main Office: Eastleigh, Nairobi
πŸ• Hours: 24 hours, 7 days a week
Chat on WhatsApp
Abuya Bus
{/* Footer */}
A
ABUYA BUS

Kenya's trusted modern coach service connecting Nairobi to the northern frontier and beyond.

Contact

πŸ“ž 0756 908 988
πŸ“ Eastleigh, Nairobi

Popular Routes

  • Nairobi β†’ Moyale
  • Nairobi β†’ Marsabit
  • Nairobi β†’ Isiolo
  • Mwingi β†’ Nairobi
Β© {new Date().getFullYear()} Abuya Bus Modern. All rights reserved.
Built with ❀️ for the people of Northern Kenya.
{/* Floating WhatsApp */} setSelectedRoute(null)} />
); } function RouteCard({ route, onBook }: { route: Route; onBook: () => void }) { return (
⏱ {route.duration}
KSh {route.price.toLocaleString()}
{route.from} {route.to}
{route.via && (
via {route.via}
)}
πŸ•’ {route.departure}
Starting from
KSh {route.price.toLocaleString()}
); }