const { Navbar, Footer, Button, Icon } = window.FriendsCarsDesignSystem_f69f0e; const LINKS = ["Home", "Fleet", "Why us", "Contact"]; const Logo = ({ h, mark }) => Friends Car — self-drive car rental in Mumbai; function MobileNav({ links, active, onNavigate, onBook }) { const [open, setOpen] = React.useState(false); React.useEffect(() => { document.body.style.overflow = open ? "hidden" : ""; return () => { document.body.style.overflow = ""; }; }, [open]); const pick = (fn) => { setOpen(false); requestAnimationFrame(fn); }; return (
{window.BIZ.phone1} {window.BIZ.phone2}
setOpen(false)} aria-hidden="true">
); } function App() { const [route, setRoute] = React.useState("Home"); const [car, setCar] = React.useState(null); const go = (r, c) => { setRoute(r); if (c !== undefined) setCar(c); window.scrollTo({ top: 0, behavior: "instant" }); }; const navigate = (link) => { if (link === "Why us" || link === "Contact") { if (route !== "Home") go("Home"); requestAnimationFrame(() => { const el = document.querySelector(link === "Why us" ? ".fc-why" : "footer"); if (el) window.scrollTo({ top: el.getBoundingClientRect().top + window.scrollY - 120, behavior: "smooth" }); }); return; } go(link); }; const openCar = (c) => go("Vehicle", c); const book = (c) => go("Booking", c || null); return (
} links={LINKS} active={LINKS.indexOf(route) > -1 ? route : "Fleet"} onNavigate={navigate} cta="Book now" onCta={() => book(null)} sticky style={{ background: "rgba(2,12,15,.58)" }} />
-1 ? route : "Fleet"} onNavigate={navigate} onBook={book} />
{route === "Home" ? : null} {route === "Fleet" ? : null} {route === "Vehicle" ? go("Fleet")} onBook={book} onOpen={openCar} /> : null} {route === "Booking" ? : null}