Files
AndreaSlopFotografie/web/src/routes/index.tsx
T
SluijsensandClaude Opus 5.5 26a8bd9469 Shares the contact form, contact card and privacy line
ContactPanel holds the coming-soon gate, the shoot options, the package
chosen via ?pakket= and the form, which loads as its own chunk either
when it comes near the screen (homepage) or right away (contact page).
ContactDetails shows the ways to reach Andrea as a card with icons. A
privacy line now sits under the form and under the coming-soon notice,
and the reply time in the thank-you comes from the site content.
Instagram is listed before Facebook, so the footer and hero follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 18:26:48 +01:00

62 lines
2.5 KiB
TypeScript

import { createFileRoute } from '@tanstack/react-router';
import Hero from '../components/Hero/Hero';
import AboutBlock from '../components/home/AboutBlock/AboutBlock';
import ContactSection from '../components/home/ContactSection/ContactSection';
import InstagramGrid from '../components/home/InstagramGrid/InstagramGrid';
import Pricing from '../components/home/Pricing/Pricing';
import Testimonials from '../components/home/Testimonials/Testimonials';
import IntroGallery from '../components/home/IntroGallery/IntroGallery';
import heroContent from '../content/heroContent';
import homeContent from '../content/homeContent';
import packages from '../content/packages';
import testimonials from '../content/testimonials';
import siteContent from '../content/siteContent';
import { visibleSocials } from '../lib/visibleSocials';
import { pageHead } from '../seo';
// ?pakket= from a "Boek" link on a price card. Only text is kept; whether it
// names a real package is checked against the shown packages (BR-PARAM-01).
type HomeSearch = { pakket?: string };
export const Route = createFileRoute('/')({
validateSearch: (search: Record<string, unknown>): HomeSearch =>
typeof search.pakket === 'string' ? { pakket: search.pakket } : {},
head: () => pageHead('/'),
component: Index,
});
// The homepage: the hero, then the sections in the order of LAYOUT.md
function Index() {
const { pakket } = Route.useSearch();
// Without a valid https link the tiles would lead nowhere: no section
const instagram = visibleSocials(siteContent.socials).find(
(social) => social.platform === 'instagram',
);
return (
<>
<Hero content={heroContent} socials={siteContent.socials} />
<IntroGallery content={homeContent.intro} />
<AboutBlock content={homeContent.about} />
<Pricing content={homeContent.pricing} packages={packages} />
<Testimonials
content={homeContent.testimonials}
testimonials={testimonials}
/>
<ContactSection
content={homeContent.contact}
packages={packages}
enabled={siteContent.contactForm.enabled}
email={siteContent.email}
replyTime={siteContent.contactForm.replyTime}
pakket={pakket}
/>
{instagram && (
<InstagramGrid
content={homeContent.instagram}
profileUrl={instagram.href}
/>
)}
</>
);
}