1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2959],{18563:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>o});var r=a(95155),s=a(12115),n=a(20063),c=a(52619),l=a.n(c);function i(){let e=(0,n.useSearchParams)(),t=(0,n.useRouter)(),a=e.get("q")||"",[c,i]=(0,s.useState)(a),[o,u]=(0,s.useState)([]),[d,h]=(0,s.useState)(!1),x=async e=>{h(!0);try{let t=await fetch("/api/search?q=".concat(encodeURIComponent(e))),a=await t.json();u(a.results||[])}catch(e){console.error(e)}finally{h(!1)}};return(0,s.useEffect)(()=>{x(a)},[a]),(0,r.jsxs)("div",{className:"min-h-screen bg-white text-black p-8 font-sans",children:[(0,r.jsxs)("header",{className:"max-w-4xl mx-auto mb-16 text-center",children:[(0,r.jsx)("h1",{className:"text-6xl font-black italic uppercase tracking-tighter mb-8 leading-none",children:"Discover"}),(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),t.push("/search?q=".concat(encodeURIComponent(c)))},className:"relative max-w-2xl mx-auto",children:[(0,r.jsx)("input",{type:"text",value:c,onChange:e=>i(e.target.value),placeholder:"Search shelves (e.g. Books, Tech, Cooking...)",className:"w-full bg-gray-50 border-4 border-black rounded-full px-8 py-5 text-xl font-bold focus:outline-none focus:ring-4 ring-indigo-100 transition-all placeholder:text-gray-300"}),(0,r.jsx)("button",{type:"submit",className:"absolute right-4 top-1/2 -translate-y-1/2 bg-black text-white px-6 py-2 rounded-full font-black uppercase tracking-widest text-xs hover:bg-gray-800 transition-all",children:"Search"})]})]}),(0,r.jsx)("main",{className:"max-w-6xl mx-auto",children:d?(0,r.jsx)("div",{className:"text-center font-black animate-pulse uppercase tracking-[0.5em] text-gray-200",children:"Searching the CloZett..."}):o.length>0?(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:o.map(e=>(0,r.jsxs)(l(),{href:"/share/".concat(e.public_slug),className:"group block p-8 bg-white border border-gray-100 rounded-[2.5rem] hover:border-black transition-all hover:shadow-2xl active:scale-[0.98]",children:[(0,r.jsx)("p",{className:"text-[10px] font-black uppercase tracking-[0.3em] text-indigo-600 mb-4",children:"Public Shelf"}),(0,r.jsx)("h2",{className:"text-3xl font-black italic uppercase tracking-tighter leading-none mb-4 group-hover:text-indigo-600 transition-colors line-clamp-2",children:e.name}),e.description&&(0,r.jsxs)("p",{className:"text-gray-500 font-medium leading-tight mb-6 line-clamp-2 italic",children:['"',e.description,'"']}),(0,r.jsxs)("div",{className:"flex items-center gap-2 pt-6 border-t border-gray-50",children:[(0,r.jsx)("div",{className:"w-5 h-5 bg-black rounded-full flex items-center justify-center text-[8px] text-white font-black",children:e.owner_name[0]}),(0,r.jsx)("span",{className:"text-[10px] font-black uppercase tracking-widest text-gray-400",children:e.owner_name})]})]},e.id))}):(0,r.jsxs)("div",{className:"text-center py-20",children:[(0,r.jsx)("p",{className:"text-gray-300 font-black italic text-4xl uppercase tracking-tighter",children:"No shelves found."}),(0,r.jsx)("p",{className:"text-gray-400 font-bold mt-2",children:"Try a different keyword or explore trending."})]})})]})}function o(){return(0,r.jsx)(s.Suspense,{fallback:(0,r.jsx)("div",{className:"p-10 font-black animate-pulse",children:"LOADING..."}),children:(0,r.jsx)(i,{})})}},20063:(e,t,a)=>{"use strict";var r=a(47260);a.o(r,"useParams")&&a.d(t,{useParams:function(){return r.useParams}}),a.o(r,"usePathname")&&a.d(t,{usePathname:function(){return r.usePathname}}),a.o(r,"useRouter")&&a.d(t,{useRouter:function(){return r.useRouter}}),a.o(r,"useSearchParams")&&a.d(t,{useSearchParams:function(){return r.useSearchParams}})},65302:(e,t,a)=>{Promise.resolve().then(a.bind(a,18563))}},e=>{e.O(0,[2619,8441,3636,7358],()=>e(e.s=65302)),_N_E=e.O()}]);
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.