This commit is contained in:
Tomas Dvorak
2026-03-02 20:20:56 +01:00
parent dfc079288f
commit 84a8acf944
86 changed files with 3938 additions and 1289 deletions
@@ -0,0 +1,2 @@
"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[771],{69771:(e,l,s)=>{s.r(l),s.d(l,{default:()=>x});s(65043);var a=s(22107),n=s(44093),i=s(76659),t=s(10202),d=s(28846),r=s(39081),c=s(72526),o=s(71093),u=s(35349),p=s(70579);const x=e=>{let{featuredOnly:l=!0,maxPolls:s=1,title:x="Hlasov\xe1n\xed"}=e;const h=(0,n.dU)("gray.50","gray.900"),{data:g,isLoading:y}=(0,c.I)({queryKey:["polls",{featured:l}],queryFn:()=>(0,o.Ps)(l?{featured:!0}:void 0),staleTime:12e4}),f=(null===g||void 0===g?void 0:g.slice(0,s))||[],{data:j,isLoading:m}=(0,c.I)({queryKey:["polls-details",f.map(e=>e.id)],queryFn:async()=>{const e=f.map(e=>(0,o.gU)(e.id));return await Promise.all(e)},enabled:f.length>0});return y||m?(0,p.jsx)(a.a,{bg:h,py:12,px:4,children:(0,p.jsxs)(t.T,{spacing:4,children:[(0,p.jsx)(i.y,{size:"lg"}),(0,p.jsx)(r.E,{children:"Na\u010d\xedt\xe1n\xed ankety..."})]})}):j&&0!==j.length?(0,p.jsx)(a.a,{bg:h,py:12,px:4,children:(0,p.jsxs)(t.T,{spacing:8,maxW:"4xl",mx:"auto",children:[(0,p.jsx)(d.D,{size:"lg",textAlign:"center",children:x}),(0,p.jsx)(t.T,{spacing:6,w:"full",children:j.map(e=>(0,p.jsx)(a.a,{w:"full",maxW:"600px",children:(0,p.jsx)(u.A,{poll:e.poll,hasVoted:e.has_voted,isActive:e.is_active,canShowResults:e.can_show_results})},e.poll.id))})]})}):null}}}]);
//# sourceMappingURL=771.2b2378c2.chunk.js.map