// app.jsx — router + entry
const { useState: useStateA, useEffect: useEffectA, useCallback: useCallbackA } = React;
function App() {
// route state: { name: 'home'|'projects'|'sectors'|'services'|'studio'|'contact'|'case', id?, filter?, subject? }
const [route, setRoute] = useStateA({ name: "home" });
const [lightbox, setLightbox] = useStateA(null); // { images, index }
const navigate = useCallbackA((next) => {
setRoute(next);
window.scrollTo({ top: 0, behavior: "instant" });
}, []);
const openLightbox = useCallbackA((images, index) => {
setLightbox({ images, index });
}, []);
let view;
switch (route.name) {
case "projects":
view = ;
break;
case "case": {
const project = PROJECTS.find(p => p.id === route.id) || PROJECTS[0];
view = ;
break;
}
case "sectors":
view = ;
break;
case "services":
view = ;
break;
case "studio":
view = ;
break;
case "contact":
view = ;
break;
case "home":
default:
view = ;
}
return (
{view}
{lightbox && (
setLightbox(null)}
/>
)}
);
}
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render();