PageSourceSearch

https://brussels-korean-connect.vercel.app/assets/GalleryDetail-DBK_EDQ4.js

js brussels-korean-connect.vercel.app collected 2026-10-03 06:19:09 UTC 4,904 bytes, 14 lines download raw bytes

1import{j as e}from"./vendor-query-D9SWbsnh.js";import{p as _}from"./storageUrl-JKwjdh9z.js";import{g as k}from"./signedUrl-t-sIQCPh.js";import{i as B,u as C,r as i}from"./vendor-react-DMCFteW_.js";import{e as S,B as E,C as p,d as h,v as D,F as I,s as P}from"./index-CcOLzb_U.js";import"./vendor-radix-NYo9MgP0.js";import"./vendor-supabase-BuOPgGrs.js";import"./vendor-utils-CgsDmYy_.js";const s={navyDark:"#0d1117",navy:"#1a2332",gold:"#d4a012",goldSoft:"#f5e6c4",goldPale:"#fdf8eb",neutralBg:"#fafaf8",neutralSection:"#f7f6f3",neutralBorder:"#e5e5e0"},A=()=>{const{id:d}=B(),f=C(),[a,b]=i.useState(null),[g,c]=i.useState(!0),[n,o]=i.useState(null);i.useEffect(()=>{if(!d){o("잘못된 접근입니다."),c(!1);return}(async()=>{try{c(!0);const{data:t,error:u}=await P.from("gallery").select(`
2            id,
3            title,
4            category,
5            description,
6            date,
7            created_at,
8            gallery_images (
9              id,
10              image_url,
11              display_order,
12              created_at
13            )
14          `).eq("id",d).maybeSingle();if(u)throw u;if(!t){o("갤러리를 찾을 수 없습니다.");return}const v=(t.gallery_images||[]).sort((r,l)=>(r.display_order??0)-(l.display_order??0)),N=await Promise.all(v.map(async r=>{const l=_(r.image_url);if(!l)return r;try{const x=await k(l.bucket,l.path,1800);return{...r,image_url:x}}catch(x){return console.error("Failed to create signed url:",r.image_url,x),r}})),w={id:t.id,title:t.title,category:t.category,description:t.description,date:t.date,created_at:t.created_at,images:N};b(w),o(null)}catch(t){console.error("Error loading gallery item",t),o("갤러리를 불러오는데 실패했습니다.")}finally{c(!1)}})()},[d]);const y=a&&a.date?new Date(a.date).toLocaleDateString("ko-KR",{year:"numeric",month:"long",day:"numeric"}):"",j=a!=null&&a.images&&a.images.length>0?a.images[0].image_url:"https://placehold.co/1200x600?text=No+Image";return e.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[e.jsx(S,{}),e.jsxs("main",{className:"flex-1 pt-[70px]",children:[e.jsxs("section",{className:"relative py-14 md:py-16 px-5 md:px-6 lg:px-8 border-b overflow-hidden",style:{backgroundColor:s.navyDark,borderBottomColor:s.neutralBorder},children:[e.jsxs("div",{className:"absolute inset-0 opacity-40 pointer-events-none",children:[e.jsx("div",{className:"absolute -top-20 -left-10 w-72 h-72 rounded-full blur-3xl",style:{background:`radial-gradient(circle, ${s.gold}, transparent 60%)`}}),e.jsx("div",{className:"absolute bottom-[-4rem] right-[-4rem] w-96 h-96 rounded-full blur-3xl",style:{background:`radial-gradient(circle, ${s.navy}, transparent 60%)`}})]}),e.jsxs("div",{className:"relative z-10 container mx-auto max-w-4xl text-white",children:[e.jsx(E,{variant:"ghost",className:"mb-6 pl-0 text-white hover:bg-white/10 hover:text-white",onClick:()=>f(-1),children:"← 갤러리로 돌아가기"}),g?e.jsx("p",{className:"text-white/70",children:"로딩 중..."}):n?e.jsx(p,{className:"bg-destructive/10 border-destructive text-destructive",children:e.jsx(h,{className:"p-6 text-center",children:n})}):a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-3 mb-8",children:[e.jsx(D,{variant:"outline",className:"uppercase tracking-[0.2em] text-[11px] border-[#f5e6c4] bg-[#fdf8eb]/90 text-[#a36f0a]",children:a.category}),e.jsx("h1",{className:"text-3xl md:text-4xl font-extrabold tracking-[-0.03em]",children:a.title}),e.jsx("p",{className:"text-sm md:text-base text-white/80",children:y})]}),e.jsx("div",{className:"rounded-2xl overflow-hidden shadow-[0_18px_45px_-35px_rgba(0,0,0,0.9)] border border-white/10 bg-black/20",children:e.jsx("img",{src:j,alt:a.title,className:"w-full h-full object-cover"})})]}):null]})]}),!g&&!n&&a&&e.jsx("section",{className:"py-10 md:py-14 px-5 md:px-6 lg:px-8",style:{backgroundColor:s.neutralBg},children:e.jsxs("div",{className:"container mx-auto max-w-4xl space-y-8",children:[e.jsx(p,{className:"border-2",style:{borderColor:s.neutralBorder},children:e.jsx(h,{className:"p-6 md:p-7",children:a.description?e.jsx("div",{className:"prose prose-slate max-w-none whitespace-pre-line text-[15px] leading-[1.8]",children:a.description}):e.jsx("p",{className:"text-sm text-[#6b7280]",children:"설명이 없습니다."})})}),a.images&&a.images.length>1&&e.jsxs("section",{className:"pt-2",children:[e.jsx("h2",{className:"text-lg md:text-xl font-semibold text-[#1f2937] mb-4",children:"사진 모음"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 md:gap-4",children:a.images.slice(1).map(m=>e.jsx("div",{className:"overflow-hidden rounded-xl bg-black/5 border",style:{borderColor:s.neutralBorder},children:e.jsx("img",{src:m.image_url,alt:a.title,className:"w-full h-full object-cover hover:scale-105 transition-transform duration-200"})},m.id))})]})]})})]}),e.jsx(I,{})]})};export{A as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.