// NRGROUP — App shell, routing, header, footer const ROUTES = { home: { hash: "#/", label: "Αρχική", Component: () => }, services: { hash: "#/services", label: "Υπηρεσίες", Component: () => }, projects: { hash: "#/projects", label: "Έργα", Component: () => }, contact: { hash: "#/contact", label: "Επικοινωνία", Component: () => }, }; function getRouteFromHash() { const h = window.location.hash || "#/"; const found = Object.entries(ROUTES).find(([, r]) => r.hash === h); return found ? found[0] : "home"; } function navTo(route) { window.location.hash = ROUTES[route].hash; window.scrollTo({ top: 0, behavior: "instant" }); } window.navTo = navTo; function Header({ current }) { const [open, setOpen] = React.useState(false); const navItems = [ { key: "home", label: "Αρχική" }, { key: "services", label: "Υπηρεσίες" }, { key: "projects", label: "Έργα" }, { key: "contact", label: "Επικοινωνία" }, ]; return (
); } function Footer() { return ( ); } function App() { const [route, setRoute] = React.useState(getRouteFromHash()); React.useEffect(() => { const onHash = () => setRoute(getRouteFromHash()); window.addEventListener("hashchange", onHash); return () => window.removeEventListener("hashchange", onHash); }, []); const Component = ROUTES[route].Component; return (