PageSourceSearch

https://kobra-kladno.lovable.app/assets/admin.sporty-DAYRMGqk.js

js kobra-kladno.lovable.app collected 2026-10-03 03:35:14 UTC 2,118 bytes, 1 lines download raw bytes

1import{r as m,j as e,i as x,t as c}from"./index-BYkFCx3B.js";import{S as u}from"./save-BBHaoEgq.js";function w(){const[d,l]=m.useState([]),i=async()=>{const{data:a}=await x.from("sports_content").select("*").order("sort_order");l(a??[])};m.useEffect(()=>{i()},[]);const p=async a=>{const{error:s}=await x.from("sports_content").update({name:a.name,perex:a.perex,what_awaits:a.what_awaits,for_whom:a.for_whom}).eq("id",a.id);s?c.error(s.message):c.success("Uloženo: "+a.name)};return e.jsxs("div",{className:"p-8 max-w-4xl",children:[e.jsx("h1",{className:"font-display text-3xl tracking-wider mb-6",children:"Texty sportů"}),e.jsx("div",{className:"space-y-6",children:d.map((a,s)=>e.jsxs("div",{className:"bg-background border border-border rounded-xl p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"font-display text-2xl tracking-wider",children:a.name}),e.jsxs("button",{onClick:()=>p(d[s]),className:"inline-flex items-center gap-2 px-3 py-1.5 bg-primary text-primary-foreground rounded text-sm",children:[e.jsx(u,{size:14})," Uložit"]})]}),e.jsx("input",{className:"w-full bg-muted rounded px-3 py-2",value:a.name,onChange:r=>l(o=>o.map((t,n)=>n===s?{...t,name:r.target.value}:t))}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:"Perex"}),e.jsx("textarea",{className:"w-full bg-muted rounded px-3 py-2 mt-1",rows:3,value:a.perex,onChange:r=>l(o=>o.map((t,n)=>n===s?{...t,perex:r.target.value}:t))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:"Co vás čeká"}),e.jsx("textarea",{className:"w-full bg-muted rounded px-3 py-2 mt-1",rows:4,value:a.what_awaits,onChange:r=>l(o=>o.map((t,n)=>n===s?{...t,what_awaits:r.target.value}:t))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-muted-foreground",children:"Pro koho"}),e.jsx("textarea",{className:"w-full bg-muted rounded px-3 py-2 mt-1",rows:4,value:a.for_whom,onChange:r=>l(o=>o.map((t,n)=>n===s?{...t,for_whom:r.target.value}:t))})]})]},a.id))})]})}export{w 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.