2026-07-31 14:56:58 +02:00
|
|
|
import React, { useEffect } from 'react';
|
2026-05-12 19:10:59 +02:00
|
|
|
import Header from './components/Header';
|
|
|
|
|
import Hero from './components/Hero';
|
|
|
|
|
import About from './components/About';
|
|
|
|
|
import Offerings from './components/Offerings';
|
|
|
|
|
import WhyHumanAI from './components/WhyHumanAI';
|
|
|
|
|
import Process from './components/Process';
|
|
|
|
|
import Audience from './components/Audience';
|
|
|
|
|
import CTASection from './components/CTASection';
|
|
|
|
|
import Footer from './components/Footer';
|
2026-06-25 12:53:49 +02:00
|
|
|
import PrivacyPolicyPage from './components/PrivacyPolicyPage';
|
2026-07-31 14:49:06 +02:00
|
|
|
import PlatformPage from './components/PlatformPage';
|
2026-05-12 19:10:59 +02:00
|
|
|
|
|
|
|
|
function App() {
|
2026-06-25 12:53:49 +02:00
|
|
|
const path = window.location.pathname.replace(/\/$/, '') || '/';
|
|
|
|
|
|
2026-07-31 14:56:58 +02:00
|
|
|
// The landing sections are client-rendered, so when a /#section URL arrives
|
|
|
|
|
// with the initial request — following "Oferta"/"Kontakt" from /privacy or
|
|
|
|
|
// /platforma — the browser resolves the fragment before the target exists and
|
|
|
|
|
// leaves the page at the top. Re-apply the scroll once the sections are
|
|
|
|
|
// mounted. In-page clicks never reach this: they are same-document fragment
|
|
|
|
|
// navigations that the browser handles natively (smoothly, via .scroll-smooth)
|
|
|
|
|
// without remounting App.
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (path !== '/') return;
|
|
|
|
|
const id = window.location.hash.slice(1);
|
|
|
|
|
if (!id) return;
|
|
|
|
|
// Jump rather than smooth-scroll: this only runs on a fresh load, where
|
|
|
|
|
// animating the full page height would just be a slow detour.
|
|
|
|
|
document.getElementById(id)?.scrollIntoView({ behavior: 'auto' });
|
|
|
|
|
}, [path]);
|
|
|
|
|
|
2026-06-25 12:53:49 +02:00
|
|
|
if (path === '/privacy') {
|
|
|
|
|
return <PrivacyPolicyPage />;
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-31 14:49:06 +02:00
|
|
|
if (path === '/platforma') {
|
|
|
|
|
return <PlatformPage />;
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-12 19:10:59 +02:00
|
|
|
return (
|
|
|
|
|
<div className="min-h-screen bg-background selection:bg-primary selection:text-background">
|
|
|
|
|
<Header />
|
|
|
|
|
<main>
|
|
|
|
|
<Hero />
|
|
|
|
|
<About />
|
|
|
|
|
<Offerings />
|
|
|
|
|
<WhyHumanAI />
|
|
|
|
|
<Process />
|
|
|
|
|
<Audience />
|
|
|
|
|
<CTASection />
|
|
|
|
|
</main>
|
|
|
|
|
<Footer />
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default App;
|