Adds the Instagram section to the homepage
Shows the handle as a link to the profile and six square photos from edge to edge (2, 3 or 6 per row), each linking to the profile in a new tab. The photos are ones the page already loads, so the section adds no downloads; the API will later fill it with the real feed. Without a valid https link to Instagram the section is left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ 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';
|
||||
@@ -10,6 +11,7 @@ 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
|
||||
@@ -26,6 +28,10 @@ export const Route = createFileRoute('/')({
|
||||
// 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} />
|
||||
@@ -43,6 +49,12 @@ function Index() {
|
||||
email={siteContent.email}
|
||||
pakket={pakket}
|
||||
/>
|
||||
{instagram && (
|
||||
<InstagramGrid
|
||||
content={homeContent.instagram}
|
||||
profileUrl={instagram.href}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user