%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/public_html/ncf/static/js/
Upload File :
Create Path :
Current File : /home/opti/public_html/ncf/static/js/49.96600b28.chunk.js

(this["webpackJsonpncf-nigeria"]=this["webpackJsonpncf-nigeria"]||[]).push([[49],{104:function(e,t,n){},105:function(e,t,n){"use strict";var s=n(48),c=n(1),a=n(21),r=(n(106),n(107),n(108),n(2));t.a=function(){var e=localStorage.getItem("loggedInUser"),t=Object(c.useState)([]),n=Object(s.a)(t,2),i=n[0],l=n[1];Object(c.useEffect)((function(){fetch("".concat(a.SERVER_URL,"/cart/all/").concat(e)).then((function(e){return e.json()})).then((function(e){200===e.status?l(e.data):console.log(e)}))}),[]);var d=i.length;return Object(r.jsx)("div",{className:"sliderbardiv sm:mb-20",children:Object(r.jsxs)("div",{className:"flex sliderbar shadow-sm -mt-9 field-bottom",children:[Object(r.jsxs)("a",{href:"/shop",className:"no-underline bg-white sliderbar-link text-black flex flex-col items-center justify-center md:py-0 py-8 w-48 broder-0 border-r border-solid",children:[Object(r.jsx)("span",{className:"mb-2",children:Object(r.jsx)("img",{src:"/assets/images/icons/shop.svg",alt:""})}),Object(r.jsx)("span",{children:"Shop"})]}),Object(r.jsxs)("a",{href:"/cart",className:"no-underline bg-white sliderbar-link text-black flex flex-col items-center justify-center md:py-0 py-8 w-48 broder-0 border-r border-solid",children:[Object(r.jsx)("span",{className:"mb-2",children:Object(r.jsx)("img",{src:"/assets/images/icons/shopping-cart.svg",alt:""})}),Object(r.jsxs)("span",{children:["Cart ",Object(r.jsxs)("span",{className:"cartNumber",children:[" ",d]})]})]}),Object(r.jsxs)("a",{href:"/donate",className:"no-underline bg-white sliderbar-link text-black flex flex-col items-center justify-center md:py-0 py-8 w-48",children:[Object(r.jsx)("span",{className:"mb-2",children:Object(r.jsx)("img",{src:"/assets/images/icons/donation.svg",alt:""})}),Object(r.jsx)("span",{children:"Donate"})]})]})})}},108:function(e,t,n){},254:function(e,t,n){"use strict";n(1);var s,c=n(127),a=n(50),r=n(49).a.div(s||(s=Object(a.a)(["\n  position: relative;\n  height: 700px;\n\tborder: 1px solid #eee\n\n  background: #eee;\n  font-family: 'Roboto', Helvetica Neue, Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  color: rgb(39, 38, 38);\n  margin: 0;\n  padding: 0;\n\n\t.swiper-container {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\t.swiper-slide {\n\t\tfont-size: 18px;\n\t\tbackground: transparent;\n\n\t\t/* Center slide text vertically */\n\t\tdisplay: -webkit-box;\n\t\tdisplay: -ms-flexbox;\n\t\tdisplay: -webkit-flex;\n\t\tdisplay: flex;\n\t\t-webkit-box-pack: center;\n\t\t-ms-flex-pack: center;\n\t\t-webkit-justify-content: center;\n\t\tjustify-content: center;\n\t\t-webkit-box-align: center;\n\t\t-ms-flex-align: center;\n\t\t-webkit-align-items: center;\n\t\talign-items: center;\n\t}\n\n\t.swiper-slide img {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\n\t.swiper-slide .slider-wrapper {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\n\t.slider-text {\n\t\tposition: absolute;\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t.field-bottom {\n\t\ttransform: translate(10%, 320px);\n\t}\n\n\t@media screen and (max-width: 640px) {\n\t\t.field-bottom {\n\t\t\ttransform: translate(0%, 0%);\n\t\t}\n\t}\n"]))),i=(n(106),n(107),n(105),n(104),n(514)),l=n(133),d=n(2);i.a.use([l.a]);t.a=function(){return Object(d.jsx)(r,{className:"mt-6",children:Object(d.jsx)(c.a,{children:Object(d.jsxs)("div",{className:"slider-wrapper",children:[Object(d.jsx)("div",{className:"slider-text border border-solid",children:Object(d.jsx)("div",{className:"max-w-7xl mx-auto pb-16 pt-48 md:px-16 px-8",children:Object(d.jsx)("div",{className:"grid md:grid-cols-2 grid-cols-1 gap-x-8 gap-y-8",children:Object(d.jsxs)("div",{className:"content banner-txt",children:[Object(d.jsx)("h1",{className:"text-4xl font-bold text-white mb-4",children:"What have you done for the Environment Lately?"}),Object(d.jsx)("p",{className:"font-light text-white mb-6",children:"What you give goes a long way"}),Object(d.jsx)("a",{href:"/donate",children:Object(d.jsx)("button",{className:"bg-green hover:bg-green-800 text-white font-bold py-2 px-8 rounded",children:"Donate"})})]})})})}),Object(d.jsx)("img",{src:"/assets/images/banner/aboutus.png",alt:""})]})})})}},499:function(e,t,n){"use strict";n.r(t);var s=n(220),c=n.n(s),a=n(221),r=n(48),i=n(1),l=n(21),d=n(254),o=(n(104),n(105)),x=(n(200),n(2));t.default=function(){var e=localStorage.getItem("loggedInUser"),t=Object(i.useState)([]),n=Object(r.a)(t,2),s=n[0],b=n[1],m=Object(i.useState)(!0),j=Object(r.a)(m,2),h=j[0],p=j[1],u=Object(i.useState)([]),g=Object(r.a)(u,2),f=(g[0],g[1],Object(i.useState)()),O=Object(r.a)(f,2),y=O[0],v=O[1];Object(i.useEffect)((function(){function t(){return(t=Object(a.a)(c.a.mark((function t(){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=[],t.next=4,fetch("".concat(l.SERVER_URL,"/cart/all/").concat(e));case 4:return t.next=6,t.sent.json();case 6:t.sent.data.forEach(function(){var e=Object(a.a)(c.a.mark((function e(t){var s,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=t.product_id,e.next=3,fetch("".concat(l.SERVER_URL,"/product/single/").concat(s));case 3:return e.next=5,e.sent.json();case 5:"operation successful"===(a=e.sent).message&&(n.push({id:t.id,user_id:t.user_id,quantity:t.quantity,total:t.total,price:t.price,product_img:a.status.image,pname:a.status.pname,product_id:s}),b([].concat(n)));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),console.log("encountered an error!"+t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})))).apply(this,arguments)}!function(){t.apply(this,arguments)}()}),[h]);var w=function(e){e.preventDefault();var t=e.target.parentElement.parentElement.id;fetch("".concat(l.SERVER_URL,"/cart/increase/").concat(t)).then((function(e){return e.json()})).then((function(e){200!==e.status?console.log(e.message):p(!h)}))},N=function(e){e.preventDefault();var t=e.target.parentElement.parentElement.id;fetch("".concat(l.SERVER_URL,"/cart/decrease/").concat(t)).then((function(e){return e.json()})).then((function(e){200!==e.status?console.log(e.message):p(!h)}))},k=function(e){e.preventDefault();var t=e.target.parentElement.parentElement.id;fetch("".concat(l.SERVER_URL,"/cart/remove/").concat(t)).then((function(e){return e.json()})).then((function(e){200!==e.status?console.log(e.message):p(!h)}))};return Object(i.useEffect)((function(){fetch("".concat(l.SERVER_URL,"/cart/sum-total/").concat(e)).then((function(e){return e.json()})).then((function(e){200!==e.status?console.log(e.message):v(e.data)}))}),[h]),Object(x.jsxs)("div",{children:[Object(x.jsx)(d.a,{}),Object(x.jsxs)("div",{children:[Object(x.jsx)(o.a,{}),Object(x.jsxs)("div",{className:"max-w-7xl mx-auto md:px-8 py-8 bg-white",children:[Object(x.jsxs)("h2",{className:"text-gray-800 font-bold text-xl mb-4",children:["Cart Summary (",s.length>=2?Object(x.jsxs)("span",{children:[s.length," Items"]}):Object(x.jsxs)("span",{children:[s.length," Item"]}),")"]}),Object(x.jsxs)("div",{className:"flex flex-col",children:[Object(x.jsx)("div",{className:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8 mb-4",children:Object(x.jsx)("div",{className:"py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8",children:Object(x.jsx)("div",{className:"shadow overflow-hidden border-b border-gray-200 sm:rounded-lg",children:Object(x.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[Object(x.jsx)("thead",{className:"bg-gray-50",children:Object(x.jsxs)("tr",{children:[Object(x.jsx)("th",{scope:"col",className:"px-6 py-3 text-left text-sm font-medium text-gray-800 tracking-wider",children:"Item"}),Object(x.jsx)("th",{scope:"col",className:"px-6 py-3 text-left text-sm font-medium text-gray-800 tracking-wider",children:"Quantity"}),Object(x.jsx)("th",{scope:"col",className:"px-6 py-3 text-left text-sm font-medium text-gray-800 tracking-wider",children:"Unit Price"}),Object(x.jsx)("th",{scope:"col",className:"px-6 py-3 text-left text-sm font-medium text-gray-800 tracking-wider",children:"Sub Total"})]})}),Object(x.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:s.map((function(e){return Object(x.jsxs)("tr",{id:e.id,children:[Object(x.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:Object(x.jsxs)("div",{className:"flex items-center",children:[Object(x.jsx)("div",{className:"flex-shrink-0 h-10 w-10",children:Object(x.jsx)("img",{className:"h-10 w-10 rounded-full",src:"https://admin.ncfnigeria.org/images/products/".concat(e.product_img),alt:""})}),Object(x.jsx)("div",{className:"ml-4",children:Object(x.jsx)("div",{className:"text-sm text-gray-500 w-64 whitespace-normal break-words",children:e.pname})})]})}),Object(x.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:Object(x.jsx)("span",{className:"text-sm text-gray-900",children:e.quantity})}),Object(x.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:Object(x.jsx)("span",{className:"px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800",children:e.price})}),Object(x.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:e.total}),Object(x.jsxs)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:[Object(x.jsx)("button",{onClick:w,className:"btn mr-1 btn-primary",children:"Increase"}),Object(x.jsx)("button",{onClick:N,className:"btn ml-1 btn-danger",children:"Decrease"})]}),Object(x.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:Object(x.jsx)("button",{onClick:k,className:"btn btn-warning",children:"Remove"})})]},e.id)}))})]})})})}),Object(x.jsx)("div",{className:"bg-white flex justify-end shadow overflow-hidden border-b border-gray-200 sm:rounded-lg p-4",children:Object(x.jsx)("div",{className:"flex space-x-4",children:Object(x.jsx)("button",{className:"bg-gray-50 border hover:bg-gray-100 text-sm text-gray-600 font-bold py-2 px-4 rounded-sm",children:"Continue Shopping"})})})]})]})]}),Object(x.jsxs)("div",{className:"max-w-7xl mx-auto md:px-8 px-4 py-8 bg-white z-index-3",children:[Object(x.jsx)("h2",{className:"text-gray-800 font-bold text-xl mb-4",children:"Details"}),Object(x.jsx)("div",{className:"grid grid-cols-12 gap-4",children:Object(x.jsx)("div",{className:"md:col-span-9 col-span-12 border flex justify-center",children:Object(x.jsxs)("div",{children:[Object(x.jsxs)("div",{className:"max-w-7xl rounded overflow-hidden shadow-md mt-8",children:[Object(x.jsxs)("div",{className:"flex justify-between font-medium text-sm mb-2 border-b py-2 px-4",children:[Object(x.jsx)("span",{children:"Sub Total"}),Object(x.jsxs)("span",{className:"font-bold",children:["\u20a6 ",y]})]}),Object(x.jsxs)("div",{className:"p-4",children:[Object(x.jsx)("p",{className:"text-gray-600 text-sm font-bold mb-2",children:"Shipping Fee"}),Object(x.jsxs)("p",{className:"text-gray-700 text-xs mb-4",children:["Shipping options will be updated",Object(x.jsx)("br",{})," during checkout."]}),Object(x.jsx)("p",{className:"text-green-light text-xs",children:"Calculate Shipping"})]}),Object(x.jsxs)("div",{className:"flex justify-between font-medium text-sm border-t py-2 px-4",children:[Object(x.jsx)("span",{className:"text-sm",children:"Total"}),Object(x.jsxs)("div",{className:"flex flex-col text-right",children:[Object(x.jsxs)("span",{className:"text-sm font-bold",children:["\u20a6",y]}),Object(x.jsx)("span",{className:"text-xs text-gray-600",children:"(includes \u20a66,250.00 Tax estimated for Nigeria)"})]})]})]}),Object(x.jsx)("div",{className:"max-w-lg flex justify-center mb-8 mt-8",children:Object(x.jsx)("button",{className:"bg-green  hover:bg-green-800 text-sm text-gray-100 font-bold py-2 px-4 rounded-sm",children:"Proceed to checkout"})})]})})})]})]})}}}]);
//# sourceMappingURL=49.96600b28.chunk.js.map

Zerion Mini Shell 1.0