1import{c as o,aB as m,E as d,s as n,j as e,g as c,L as l}from"./index-CICaNWwF.js";import{a as p}from"./app-shell-BPPNl7-L.js";import{V as x}from"./video-thumb-DzUWh_mD.js";import"./bell-HYm6-YaL.js";import"./arrow-right-DEAWO6Yn.js";import"./at-sign-DwjMdKO8.js";import"./tier-badge-Mj14Fc8T.js";import"./feedback.functions-DD6clJPd.js";import"./star-eguBFjoY.js";import"./gift-BsT_WO7X.js";import"./users-DFu0EcbI.js";import"./user-plus-C1vJu2PQ.js";import"./trophy-DUYfd_3m.js";import"./crown-C9AFzqwq.js";import"./shield-check-BbywUhkh.js";import"./info-BDJowwQ2.js";import"./search-DGlW6WaA.js";import"./house-EfTMk1wX.js";import"./list-checks-C1UOC0gj.js";import"./shopping-bag-Bp3-SevZ.js";import"./megaphone-uIAPvtE3.js";import"./chevron-down-C_HsAtoj.js";const u=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],y=o("hash",u);function F(){const{tag:r}=m({from:"/app/tag/$tag"}),s=r.toLowerCase(),{data:a,isLoading:i}=d({queryKey:["tag-posts",s],queryFn:async()=>{const{data:t}=await n.from("posts").select("id,caption,media_url,media_type,user_id,created_at").contains("hashtags",[s]).is("deleted_at",null).order("created_at",{ascending:!1}).limit(60);return t||[]}});return e.jsxs("div",{className:"mx-auto max-w-md",children:[e.jsx(p,{back:!0,title:`#${s}`,subtitle:`${a?.length??0} posts`}),e.jsx("div",{className:"px-5 mb-3",children:e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-primary-soft text-primary text-sm font-semibold",children:[e.jsx(y,{className:"size-4"})," ",s]})}),i&&e.jsx("div",{className:"py-10 flex justify-center",children:e.jsx(c,{className:"size-5 animate-spin text-primary"})}),!i&&!a?.length&&e.jsxs("div",{className:"mx-5 rounded-2xl bg-card p-8 text-center shadow-soft",children:[e.jsx("p",{className:"font-display font-semibold",children:"Nothing here yet"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Be the first to post with #",s,"."]})]}),e.jsx("div",{className:"grid grid-cols-3 gap-0.5 px-0.5",children:a?.map(t=>e.jsx(l,{to:"/app/posts/$id",params:{id:t.id},className:"aspect-square bg-muted overflow-hidden",children:t.media_type==="video"?e.jsx(x,{src:t.media_url}):e.jsx("img",{src:t.media_url,alt:t.caption??"",loading:"lazy",className:"size-full object-cover"})},t.id))})]})}export{F as component};
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.