PageSourceSearch

https://smart-browse-agentic-shopper.vercel.app/assets/CreatorProfile-qYlyQ0n7.js

js smart-browse-agentic-shopper.vercel.app collected 2026-10-03 07:45:34 UTC 3,033 bytes, 1 lines download raw bytes

1import{aC as w,a5 as S,r as a,aE as P,j as e,G as O,B as E,L as $,O as B,a6 as I,a7 as x,ah as C,a9 as k,aJ as D}from"./index-Bf_HZOPk.js";import{P as _}from"./PublicListCard-BWvh-dCx.js";import{A}from"./arrow-left-DfX7ygVJ.js";function z(){const{userId:r}=w(),{fetchProfileLists:h,voteOnList:g}=S(),[n,b]=a.useState(null),[t,j]=a.useState([]),[v,c]=a.useState(!0),[d,p]=a.useState(null),[m,y]=a.useState(null),[L,u]=a.useState(!1);a.useEffect(()=>{let s=!1;return(async()=>{if(r){c(!0);try{const l=await h(r);s||(b(l.user),j(l.lists),p(null))}catch(l){s||p(l instanceof Error?l.message:"Failed to load profile")}finally{s||c(!1)}}})(),()=>{s=!0}},[r]);const N=s=>{y(s),u(!0)},o=n?.username?`@${n.username}`:n?.display_name,f=t.reduce((s,i)=>s+(i.product_opens??0),0);return a.useEffect(()=>{if(!r||!n)return;const s=o||"SmartBrowse creator";P({title:`${s} — public shopping lists | SmartBrowse`,description:`${t.length} public shopping list${t.length===1?"":"s"} from ${s} on SmartBrowse, with real prices and the reasoning behind every pick.`,canonicalPath:`/profiles/${r}`,jsonLd:{"@context":"https://schema.org","@type":"ProfilePage",mainEntity:{"@type":"Person",name:s,url:`${D}/profiles/${r}`},hasPart:t.slice(0,30).map(i=>({"@type":"ItemList",name:i.name,description:i.description,numberOfItems:i.products_count}))}})},[r,n,t,o]),e.jsxs("div",{className:"flex min-h-screen flex-col bg-[rgb(var(--background))] text-[rgb(var(--foreground))]",children:[e.jsx(O,{}),e.jsxs("main",{className:"mx-auto w-full max-w-5xl flex-1 px-4 py-8 sm:px-6 lg:px-8",children:[e.jsx(E,{asChild:!0,variant:"ghost",size:"sm",className:"mb-6 -ml-2 rounded-full",children:e.jsxs($,{to:"/lists?tab=discover",children:[e.jsx(A,{className:"mr-2 h-4 w-4"}),"Back to Discover"]})}),v?e.jsx(B,{label:"Loading profile…"}):d||!n?e.jsx("p",{className:"py-24 text-center text-[rgb(var(--muted-foreground))]",children:d||"This profile is not available."}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"flex items-center gap-4 roun
1ded-2xl border border-[rgb(var(--border))] bg-[rgb(var(--card))] p-6 shadow-sm",children:[e.jsx("div",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-[rgb(var(--secondary))]",children:e.jsx(I,{className:"h-7 w-7 text-[rgb(var(--muted-foreground))]"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-[var(--font-display)]",children:o}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[e.jsxs(x,{variant:"secondary",className:"w-fit",children:[t.length," public ",t.length===1?"list":"lists"]}),f>0&&e.jsx(x,{variant:"secondary",className:"w-fit",children:e.jsx(C,{opens:f})})]})]})]}),t.length===0?e.jsx("p",{className:"py-12 text-center text-[rgb(var(--muted-foreground))]",children:"This creator has not published any lists yet."}):e.jsx("div",{className:"space-y-3",children:t.map(s=>e.jsx(_,{list:s,onOpen:N,onVote:g},s.id))})]})]}),m&&e.jsx(k,{listId:m,open:L,onOpenChange:u,refreshLists:()=>{}})]})}export{z as CreatorProfile};

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.