(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[218],{7864:function(e,t,r){Promise.resolve().then(r.bind(r,1828))},8850:function(e,t,r){"use strict";var a=r(7437);t.Z=function(e){let{recordsPerPage:t,order:r,paginate:s}=e,n=[...Array(Math.ceil(r/t)+1).keys()].slice(1);return(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"flex justify-center py-10 dark:bg-dark ",children:n.map((e,t)=>(0,a.jsx)("ul",{className:"flex items-center justify-center gap-1 px-2",children:(0,a.jsx)("li",{children:(0,a.jsx)("button",{className:"flex h-10 min-w-10 items-center justify-center rounded-lg bg-black px-2 text-white hover:bg-gray-2 dark:text-white dark:hover:bg-white/5",onClick:()=>s(e),children:e},t)})}))})})}},1828:function(e,t,r){"use strict";r.d(t,{default:function(){return x}});var a=r(7437),s=r(2265),n=r(8850),i=r(7138),d=function(e){let{list:t}=e,{title:r,city:s,state:n,category:d,profilePic:l,_id:c,slug:o,description:x}=t;return(0,a.jsx)("div",{className:"w-full px-4 md:w-1/2 xl:w-1/3",children:(0,a.jsxs)("div",{className:"mb-10 overflow-hidden rounded-lg bg-white shadow-1 duration-300 hover:shadow-3 dark:bg-dark-2 dark:shadow-card dark:hover:shadow-3",children:[(0,a.jsx)("img",{src:"https://api.247tranzact.com/images/"+l,alt:r,className:"w-full h-fit"}),(0,a.jsx)("div",{className:"p-8 text-center sm:p-9 md:p-7 xl:p-9",children:(0,a.jsxs)("div",{className:"relative z-10 mx-7 -mt-20 rounded-lg bg-white px-3 py-[34px] text-center shadow-portfolio dark:bg-dark-2 dark:shadow-box-dark",children:[(0,a.jsx)("span",{className:"mb-2 block text-sm font-medium text-primary",children:d}),(0,a.jsxs)("h3",{className:"mb-5 text-xl font-bold text-dark dark:text-white",children:[(0,a.jsx)(i.default,{href:{pathname:"/listing/".concat(c),query:o},children:r})," "]}),(0,a.jsx)("p",{className:"text-sm text-body-color dark:text-dark-6",children:(0,a.jsxs)("span",{className:"text-red-700",children:[s,",",n]})}),(0,a.jsxs)("p",{className:"mb-7 text-base leading-relaxed text-body-color dark:text-dark-6",children:[x.slice(0,200),"..."]}),(0,a.jsx)(i.default,{className:"inline-block rounded-md border border-stroke px-7 py-[10px] text-sm font-medium text-body-color transition hover:border-primary hover:bg-primary hover:text-white dark:border-dark-3 dark:text-dark-6",href:{pathname:"/listing/".concat(c),query:o},children:"View Details"})," "]})})]})})},l=function(e){let{post:t}=e;return(0,a.jsx)(a.Fragment,{children:t&&t.map((e,t)=>(0,a.jsx)(d,{list:e},t))})},c=r(9039);let o=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return fetch(...t).then(e=>e.json())};var x=function(e){let[t,r]=(0,s.useState)(1),{isLoading:i,data:d,error:x}=(0,c.ZP)("https://api.247tranzact.com/api/market/",o);if(i)return(0,a.jsx)("p",{children:"data is loading"});if(x)return(0,a.jsx)("p",{children:"Error in Connection"});let h=20*t,m=d.slice(h-20,h);return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"-mx-4 flex flex-wrap",children:(0,a.jsx)(l,{post:m})}),(0,a.jsx)(n.Z,{order:d.length,recordsPerPage:20,paginate:e=>r(e)})]})}},7138:function(e,t,r){"use strict";r.d(t,{default:function(){return s.a}});var a=r(231),s=r.n(a)}},function(e){e.O(0,[231,39,971,23,744],function(){return e(e.s=7864)}),_N_E=e.O()}]);