1"use strict";(self.webpackChunkflytant=self.webpackChunkflytant||[]).push([[9890],{59890:(s,e,l)=>{l.r(e),l.d(e,{default:()=>v});var a=l(9062),i=l(72791),d=l(16856),n=l(16871),t=l(87789),o=l(98138),r=l(18054),c=l(72426),u=l.n(c),x=l(80184);const v=()=>{var s,e,l;const{brandsList:c,setBrandsList:v,setNotify:m}=(0,r.Z)(),[p,h]=(0,i.useState)(!(null!==c&&void 0!==c&&null!==(s=c.data)&&void 0!==s&&s.length)),[g,j]=(0,i.useState)(!1),b=(0,a.ad)(),f=(0,n.s0)(),N=async s=>{try{s(!0);let e=(0,a.IO)((0,a.hJ)(b,"brandsAnalysis"),(0,a.Xo)("creationDate","desc"),(0,a.b9)(12));null!==c&&void 0!==c&&c.lastVisible&&(e=(0,a.IO)((0,a.hJ)(b,"brandsAnalysis"),(0,a.Xo)("creationDate","desc"),(0,a.TQ)(null===c||void 0===c?void 0:c.lastVisible),(0,a.b9)(12)));const l=await(0,a.PL)(e),i=l.docs.map((s=>({...s.data(),id:s.id})));v((s=>({data:[...null===s||void 0===s?void 0:s.data,...i],lastVisible:12===i.length&&l.docs.at(-1)}))),s(!1)}catch(e){s(!1)}};return(0,i.useEffect)((()=>{var s;null!==c&&void 0!==c&&null!==(s=c.data)&&void 0!==s&&s.length||N(h)}),[]),p?(0,x.jsx)("div",{className:"min-h-screen r-box pt-20",children:(0,x.jsx)(t.Z,{})}):(0,x.jsxs)("div",{className:"min-h-screen py-10 r-box",children:[(null===c||void 0===c||null===(e=c.data)||void 0===e?void 0:e.length)>0?(0,x.jsxs)("div",{className:"w-fit max-w-full mt-8 bg-gray-200/60 rounded-md p-5 overflow-x-auto mx-auto",children:[(0,x.jsxs)("div",{className:"min-w-[1020px] bg-white p-5 rounded-md grid grid-cols-[50px_200px_minmax(250px,_1fr)_100px_110px_120px_30px] gap-5 items-center text-sm",children:[(0,x.jsx)("span",{}),(0,x.jsx)("p",{children:"Brand"}),(0,x.jsx)("p",{children:"Campaign name"}),(0,x.jsx)("p",{children:"Budget"}),(0,x.jsx)("p",{children:"Status"}),(0,x.jsx)("p",{children:"Created on"})]}),null===c||void 0===c||null===(l=c.data)||void 0===l?void 0:l.map(((s,e)=>{var l,a;return(0,x.jsxs)("div",{onClick:()=>f("/brandslist/".concat(null===s||void 0===s?void 0:s.id)),className:"min-w-[1020px] bg-white p-5 rounded-md mt-5 grid grid-cols-[50px_200px_minmax(250px,_1fr)_100px_110px_120px_30px] cursor-pointer gap-5 items-center",children:[(0,x.jsx)("p",{className:"",children:e+1}),(0,x.jsxs)("div",{className:"flex items-center gap-3",children:[(0,x.jsx)("img",{loading:"lazy",src:null===s||void 0===s?void 0:s.brandImageUrl,alt:"",className:"w-10 aspect-square rounded-full object-cover object-center"}),(0,x.jsx)("p",{children:null===s||void 0===s?void 0:s.brandName})]}),(0,x.jsx)("p",{className:"line-clamp-1",children:null===s||void 0===s?void 0:s.campaignName}),(0,x.jsxs)("p",{children:[(0,x.jsxs)("span",{className:"inr",children:[null===s||void 0===s?void 0:s.currency," "]}),null===s||void 0===s?void 0:s.budget]}),(0,x.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,x.jsx)("div",{className:"w-2 aspect-square rounded-full ".concat("live"===(null===s||void 0===s||null===(l=s.status)||void 0===l?void 0:l.toLowerCase())?"bg-green-400":"lead"===(null===s||void 0===s||null===(a=s.status)||void 0===a?void 0:a.toLowerCase())?"bg-red-400":"bg-gray-400")}),(0,x.jsx)("p",{className:"text-sm",children:null===s||void 0===s?void 0:s.status})]}),(0,x.jsx)("p",{children:u().unix(null===s||void 0===s?void 0:s.creationDate).format("DD MMM YYYY")}),(0,x.jsx)(d.Fqs,{onClick:e=>{e.stopPropagation(),window.navigator.clipboard.writeText((null===s||void 0===s?void 0:s.link)||""),m({status:!0,message:"Link copied successfully"})},className:"text-xl"})]},null===s||void 0===s?void 0:s.id)}))]}):(0,x.jsx)("p",{className:"mt-8 text-center",children:"No list found"}),(null===c||void 0===c?void 0:c.lastVisible)&&!g&&!p&&(0,x.jsx)("button",{onClick:()=>N(j),className:"bg-black w-40 h-11 rounded-full text-white font-medium mx-auto block mt-10",children:"Load more"}),g&&(0,x.jsx)("div",{className:"w-fit mx-auto mt-10",children:(0,x.jsx)(o.Z,{})})]})}}}]); 2//# sourceMappingURL=9890.da689082.chunk.js.map
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.