1import{aB as m,u as p,e as n,E as d,s as l,r as c,j as e,A as u,aC as f,g as x,L as y}from"./index-BOoZFuWa.js";import{P as h}from"./profile-view-JKx2XdAv.js";import"./react-XC-_FY9B.js";import"./verified-tick-DywURtFW.js";import"./crown-Daal2D_2.js";import"./loyalty-TJIgWOd-.js";import"./trophy-1OJ8FeBL.js";import"./star-7QRc-wM9.js";import"./camera-DtnKKLNt.js";import"./ban-DKMTbXKg.js";import"./edit-ad-sheet-D6gH4rie.js";import"./app-settings-DS2oonSQ.js";import"./notify.functions-CUGDnArA.js";import"./image-CmcXo6BU.js";import"./zap-D-q91ZPV.js";import"./edit-promo-sheet-DmuJCDDr.js";import"./users-CZw1mlml.js";import"./video-thumb-CPM5bTY0.js";import"./plus-CnV8iNNU.js";import"./trending-up-whRP9Owe.js";import"./user-plus-B99o8SMc.js";import"./user-check-nU8bWOp4.js";import"./rocket-AIwVphDB.js";import"./list-checks-Cv4-dcGV.js";import"./megaphone-UorZ1h2H.js";import"./youtube-CAaGfYE2.js";function G(){const{handle:t}=m({from:"/app/$handle"}),{user:r}=p(),i=n(),a=d({queryKey:["app-handle-profile",t.toLowerCase()],queryFn:async()=>{const{data:s,error:o}=await l.rpc("get_profile_by_handle",{_handle:t});if(o)throw o;return Array.isArray(s)?s[0]:s}});return c.useEffect(()=>{a.data&&r?.id===a.data.id&&i({to:"/app/profile",replace:!0})},[a.data,r,i]),e.jsxs("div",{className:"mx-auto max-w-md min-h-screen bg-background",children:[e.jsxs("header",{className:"safe-top px-4 py-3 flex items-center gap-3",children:[e.jsx("button",{type:"button",onClick:()=>f(),"aria-label":"Back",className:"size-9 rounded-full bg-card shadow-soft flex items-center justify-center",children:e.jsx(u,{className:"size-4"})}),e.jsxs("h1",{className:"font-display font-semibold text-lg",children:["@",t]})]}),a.isLoading&&e.jsx("div",{className:"py-16 flex justify-center",children:e.jsx(x,{className:"size-5 animate-spin text-primary"})}),!a.isLoading&&!a.data&&e.jsxs("div",{className:"px-6 py-16 text-center",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["No buddy found with @",t,"."]}),e.jsx(y,{to:"/app/browse",className:"mt-4 inline-block rounded-full bg-primary text-primary-foreground px-4 py-2 text-sm font-semibold",children:"Browse community"})]}),a.data&&r?.id!==a.data.id&&e.jsx(h,{userId:a.data.id,isOwn:!1})]})}export{G 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.