PageSourceSearch

https://layerswap.io/app/_next/static/chunks/1147.7923407e18e4bcaf.js

js layerswap.io collected 2026-10-03 22:16:43 UTC 3,199 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1147],{21147:(e,a,s)=>{s.r(a),s.d(a,{Campaigns:()=>h,CampaignsComponent:()=>o});var l=s(62021),n=s(4903),t=s(25761),i=s(90358),d=s(8653),r=s(37788),c=s(51408);let o=e=>{let{onCampaignSelect:a}=e,s=new t.Ay,{data:c,isLoading:o}=(0,d.Ay)("/campaigns",s.fetcher),h=null==c?void 0:c.data,p=null==h?void 0:h.sort((e,a)=>new Date(e.end_date).getTime()-new Date(a.end_date).getTime()),g=(null==p?void 0:p.filter(x))||[],u=(null==p?void 0:p.filter(e=>!x(e)))||[];return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(r.x.Content,{children:o?(0,l.jsx)("div",{className:"h-full w-full relative min-h-[350px]",children:(0,l.jsx)("div",{className:"absolute top-[calc(50%-5px)] left-[calc(50%-5px)]",children:(0,l.jsx)(i.A,{className:"animate-spin h-5 w-5"})})}):(0,l.jsxs)("div",{className:"space-y-5 h-full w-full text-primary-text sm:min-h-[350px]",children:[(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("p",{className:"font-bold text-left leading-5",children:"Campaigns"}),(0,l.jsx)("div",{className:"bg-secondary-500 divide-y divide-secondary-500 rounded-lg shadow-lg border border-secondary-500 hover:border-secondary-400 transition duration-200",children:(0,l.jsx)("div",{className:"p-3 space-y-4",children:g.length>0?g.map(e=>(0,l.jsx)(m,{onCampaignSelect:a,campaign:e},e.id)):(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center space-y-2 w-full",children:[(0,l.jsx)(n.A,{className:"h-10 w-10 text-primary"}),(0,l.jsx)("p",{className:"font-bold text-center",children:"There are no active campaigns right now"})]})})})]}),u.length>0&&(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("p",{className:"font-bold text-left leading-5",children:"Old campaigns"}),(0,l.jsx)("div",{className:"bg-secondary-500 divide-y divide-secondary-500 rounded-lg shadow-lg border border-secondary-500 hover:border-secondary-400 transition duration-200",children:(0,l.jsx)("div",{className:"p-3 dpsv flex flex-col space-y-4",children:null==u?void 0:u.map(e=>(0,l.jsx)(m,{onCampaignSelect:a,campaign:e},e.id))})})]})]})})})},m=e=>{let{campaign:a,onCampaignSelect:s}=e,n=((new Date(a.end_date).getTime()-new Date().getTime())/864e5).toFixed(),t=x(a);return(0,l.jsxs)("div",{onClick:()=>s(a),className:"flex justify-between items-center",children:[(0,l.jsxs)("span",{className:"flex items-center gap-1 hover:opacity-70 active:scale-90 duration-200 transition-all",children:[(0,l.jsx)("span",{className:"h-5 w-5 relative",children:(a.logo_url||a.network.logo)&&(0,l.jsx)(c.o,{src:a.logo_url||a.network.logo,alt:"Project Logo",height:"40",width:"40",loading:"eager",className:"rounded-md object-contain"})}),(0,l.jsxs)("span",{className:"font-semibold text-base text-left flex items-center",children:[null==a?void 0:a.display_name," "]})]}),t&&(0,l.jsxs)("span",{className:"text-primary-text-tertiary text-right text-sm",children:[n," days left"]})]})};function x(e){let a=new Date;return new Date(null==e?void 0:e.end_date).getTime()>a.getTime()}let h=e=>(0,l.jsx)(r.x,{goBack:e.goBack,hideMenu:e.hideMenu,children:(0,l.jsx)(o,{onCampaignSelect:e.onCampaignSelect})})}}]);
2//# sourceMappingURL=1147.7923407e18e4bcaf.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.