(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404],{387:function(e,a,l){Promise.resolve().then(l.bind(l,8645))},8645:function(e,a,l){"use strict";l.d(a,{default:function(){return h}});var t=l(7437),n=l(2265),r=l(8850),i=l(7138);l(6648);var s=l(5661),c=function(e){let{list:a}=e;return(0,t.jsx)("div",{className:"w-full px-4 md:w-1/2 lg:w-1/3",children:(0,t.jsxs)("div",{className:"mb-10 w-full",children:[(0,t.jsx)("div",{className:"mb-8 overflow-hidden rounded",children:(0,t.jsx)("img",{src:s.Xo+a.photo,alt:"image",className:"w-full",width:500,height:100})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mb-5 inline-block rounded bg-primary px-4 py-1 text-center text-xs font-semibold leading-loose text-blue-800",children:new Date(a.createdAt).toDateString()}),(0,t.jsxs)("div",{className:"mb-5 inline-block rounded bg-primary px-4 py-1 text-right text-xs font-semibold leading-loose text-blue-800",children:["By: ",a.username]}),(0,t.jsx)("h3",{className:"mb-4 inline-block text-xl font-semibold text-dark hover:text-primary sm:text-2xl lg:text-xl xl:text-2xl dark:text-white",children:(0,t.jsx)(i.default,{href:{pathname:"/blog/".concat(a.id),query:a.slug},children:a.title})}),(0,t.jsxs)("p",{className:"text-base text-body-color dark:text-dark-6",children:[a.description.slice(0,200),"..."]})]})]})})},o=function(e){let{list:a}=e;return(0,t.jsx)(t.Fragment,{children:a&&a.map((e,a)=>(0,t.jsx)(c,{list:e},a))})},d=l(9039);let u=function(){for(var e=arguments.length,a=Array(e),l=0;l<e;l++)a[l]=arguments[l];return fetch(...a).then(e=>e.json())};var h=function(e){let[a,l]=(0,n.useState)(1),{isLoading:i,data:c,error:h}=(0,d.ZP)(s.nC,u);if(i)return(0,t.jsx)("p",{children:"data is loading"});if(h)return(0,t.jsx)("p",{children:"Error in Connection"});let x=20*a,m=c.slice(x-20,x);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"-mx-4 flex flex-wrap",children:(0,t.jsx)(o,{list:m})}),(0,t.jsx)(r.Z,{order:c.length,recordsPerPage:20,paginate:e=>l(e)})]})}},5661:function(e,a,l){"use strict";l.d(a,{VN:function(){return i},Xo:function(){return r},YM:function(){return o},nC:function(){return s},u7:function(){return c}});var t=l(8472);a.ZP=t.Z.create({baseURL:"https://cloud.247tranzact.com/api/",headers:{"Content-Type":"application/json"}});let n="https://cloud.247tranzact.com/api/",r="https://cloud.247tranzact.com/images/",i=n+"market/",s=n+"posts/",c=n+"product/",o=[{label:"Agriculture and Raw material",value:"Agriculture and Raw material"},{label:"Apparel and Accessories",value:"Apparel and Accessories"},{label:"Home and Garden",value:"Home and Garden"},{label:"Beauty & Personal Care",value:"Beauty & Personal Care"},{label:"Consumer Electronics",value:"Consumer Electronics"},{label:"Sports and Entertainment",value:"Sports and Entertainment"},{label:"Packaging and Printing",value:"Packaging and Printing"},{label:"Industrial Machines",value:"Industrial Machines"},{label:"Shoes and Accesories",value:"Shoes and Accesories"},{label:"Vehicle Parts and Accessories",value:"Vehicle Parts and Accessories"},{label:"Furniture",value:"Furniture"},{label:"Home Appliances",value:"Home Appliances"},{label:"Tools and Hardware",value:"Tools and Hardware"},{label:"Tech and Softwares",value:"Tech and Softwares"},{label:"Luggages and Bags",value:"Luggages and Bags"},{label:"Construction & Paints",value:"Construction & Paints"},{label:"Lights & Lighting",value:"Lights & Lighting"},{label:"Health Care and Medical Supplies",value:"Health Care and Medical Supplies"},{label:"School and Office Supplies",value:"School and Office Supplies"},{label:"Renewable Energy",value:"Renewable Energy"},{label:"Food and Beverage",value:"Food and Beverage"},{label:"Chemicals",value:"Chemicals"}]},8850:function(e,a,l){"use strict";var t=l(7437);a.Z=function(e){let{recordsPerPage:a,order:l,paginate:n}=e,r=[...Array(Math.ceil(l/a)+1).keys()].slice(1);return(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"flex justify-center py-10 dark:bg-dark ",children:r.map((e,a)=>(0,t.jsx)("ul",{className:"flex items-center justify-center gap-1 px-2",children:(0,t.jsx)("li",{children:(0,t.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:()=>n(e),children:e},a)})}))})})}}},function(e){e.O(0,[231,472,39,974,971,23,744],function(){return e(e.s=387)}),_N_E=e.O()}]);