// AppAlt.jsx + index-alt host with 3-page routing function AppAlt() { const [route, setRoute] = React.useState("main"); // Re-init icons + scroll to top whenever route changes React.useEffect(() => { if (window.lucide) window.lucide.createIcons(); window.scrollTo({ top: 0, behavior: "auto" }); }, [route]); const label = route === "main" ? "01 Main (Alt)" : route === "about" ? "02 О компании (Alt)" : "03 Контакты (Alt)"; return (
{route === "main" && } {route === "about" && } {route === "contacts" && }
); } function MainPageAlt({ route, setRoute }) { return (
); } window.AppAlt = AppAlt; window.MainPageAlt = MainPageAlt;