PageSourceSearch

https://mmastalker.com/assets/AdminAudienceStats-BzhRgTjl.js

js mmastalker.com collected 2026-10-04 21:37:03 UTC 2,831 bytes, 1 lines download raw bytes

1import{t as r,r as _,s as i,j as e,f as y,g as b,h as j,i as A,Z as C,I as S,e as N}from"./index-CN_dmJ3G.js";import{A as k}from"./AdminPageLayout-BL_tpG_B.js";import{I as w}from"./info-CLAZWabc.js";import{S as E}from"./save-BF7KYKxT.js";const p=[{key:"sponsor_stat_monthly_impressions",label:"Monthly Impressions",description:"Shown on /partnerships page audience stats",defaultVal:"100K+"},{key:"sponsor_stat_social_following",label:"Social Following",description:"Combined social following across platforms",defaultVal:"8,200+"},{key:"sponsor_stat_avg_event_attendance",label:"Avg Event Attendance",description:"Average live attendance per event covered",defaultVal:"2,000+"},{key:"sponsor_stat_events_per_year",label:"Events Covered / Year",description:"Range of events covered annually",defaultVal:"12-36"},{key:"sponsor_stat_years_in_mma",label:"Years in Regional MMA",description:"Years of coverage in the regional MMA scene",defaultVal:"7+"},{key:"sponsor_stat_core_age",label:"Core Age Demographic",description:"Primary audience age range",defaultVal:"25-44"}];function T(){const u=r.useUtils(),{data:g=[],isLoading:m}=r.sponsorship.config.list.useQuery(),[a,l]=_.useState({}),c=r.sponsorship.config.upsert.useMutation({onSuccess:()=>{u.sponsorship.config.list.invalidate(),i.success("Stats saved"),l({})},onError:s=>i.error(s.message)}),h=s=>a[s]!==void 0?a[s]:g.find(t=>t.key===s)?.value??"",d=Object.keys(a).length>0,f=()=>{if(!d){i.info("No changes to save");return}Object.entries(a).forEach(([s,t])=>{const n=p.find(o=>o.key===s);c.mutate({key:s,value:t,label:n?.label,description:n?.description})})};return m?e.jsx("div",{className:"text-muted-foreground py-4",children:"Loading..."}):e.jsxs(k,{title:"Audience Stats",description:"These numbers appear on the public /partnerships page to show potential partners your reach.",actions:d?e.jsxs(N,{onClick:f,className:"gap-2",disabled:c.isPending,children:[e.jsx(E,{className:"w-4 h-4"})," Save Changes"]}):void 0,children:[e.jsxs(y,{children:[e.jsx(b,{children:e.jsxs(j,{className:"text-base flex items-center gap-2",children:[e.jsx(w,{className:"w-4 h-4 text-muted-foreground"}),"Public Stats Display"]})}),e.jsx(A,{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:p.map(({key:s,label:t,description:n,defaultVal:o})=>e.jsxs("div",{className:"space-y-1",children:[e.jsx(C,{className:"text-sm",children:t}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n}),e.jsx(S,{value:h(s)||"",onChange:v=>l(x=>({...x,[s]:v.target.value})),placeholder:o,className:a[s]!==void 0?"border-primary/60":""})]},s))})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave a field blank to use the default fallback value shown as placeholder. Changes take effect immediately on the /partnerships page after saving."})]})}export{T 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.