/** * 사진 · 가로 슬라이드 — 큰 사진을 한 장씩 넘겨 본다. * 장수가 적고 한 장 한 장이 좋을 때 가장 세게 보인다. */ import {useState} from 'react'; import { Lightbox, PhotoTile, SectionBody, SectionFrame, SectionHeading, } from '../../primitives'; import type {SectionRenderProps} from '../../types'; import {galleryPhotos} from '../common'; export function PhotosCarousel(props: SectionRenderProps) { const {section, isSelected, onSelect, industryId, template, photos} = props; const items = galleryPhotos(industryId, photos); const [openIndex, setOpenIndex] = useState(null); return (
{items.map((photo, idx) => ( setOpenIndex(idx)} className="w-[78vw] max-w-[420px] shrink-0 snap-center" /> ))}
{items.map((photo) => ( ))}
setOpenIndex(null)} onMove={setOpenIndex} />
); }