%PDF- %PDF-
Direktori : /home/opti/public_html/ncf/static/js/ |
Current File : /home/opti/public_html/ncf/static/js/22.f1cf7fd5.chunk.js |
(this["webpackJsonpncf-nigeria"]=this["webpackJsonpncf-nigeria"]||[]).push([[22],{104:function(e,t,a){},105:function(e,t,a){"use strict";var s=a(48),n=a(1),c=a(21),l=(a(106),a(107),a(108),a(2));t.a=function(){var e=localStorage.getItem("loggedInUser"),t=Object(n.useState)([]),a=Object(s.a)(t,2),i=a[0],r=a[1];Object(n.useEffect)((function(){fetch("".concat(c.SERVER_URL,"/cart/all/").concat(e)).then((function(e){return e.json()})).then((function(e){200===e.status?r(e.data):console.log(e)}))}),[]);var o=i.length;return Object(l.jsx)("div",{className:"sliderbardiv sm:mb-20",children:Object(l.jsxs)("div",{className:"flex sliderbar shadow-sm -mt-9 field-bottom",children:[Object(l.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(l.jsx)("span",{className:"mb-2",children:Object(l.jsx)("img",{src:"/assets/images/icons/shop.svg",alt:""})}),Object(l.jsx)("span",{children:"Shop"})]}),Object(l.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(l.jsx)("span",{className:"mb-2",children:Object(l.jsx)("img",{src:"/assets/images/icons/shopping-cart.svg",alt:""})}),Object(l.jsxs)("span",{children:["Cart ",Object(l.jsxs)("span",{className:"cartNumber",children:[" ",o]})]})]}),Object(l.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(l.jsx)("span",{className:"mb-2",children:Object(l.jsx)("img",{src:"/assets/images/icons/donation.svg",alt:""})}),Object(l.jsx)("span",{children:"Donate"})]})]})})}},108:function(e,t,a){},146:function(e,t,a){},159:function(e,t,a){"use strict";var s=a(48),n=a(1),c=a(518),l=a(502),i=a(521),r=(a(160),a(21)),o=a(2);t.a=function(){var e=Object(n.useState)([]),t=Object(s.a)(e,2),a=t[0],d=t[1];Object(n.useEffect)((function(){fetch("".concat(r.SERVER_URL,"/blog/category")).then((function(e){return e.json()})).then((function(e){console.log(e.message,"json"),200===e.status?d(e.data):console.log("Oops couldn't fetch data")}))}),[]);var b=a.slice(0,5);return Object(o.jsx)(c.a,{collapseOnSelect:!0,expand:"lg",className:"bg-gray-200",variant:"light",children:Object(o.jsxs)(l.a,{children:[Object(o.jsx)(c.a.Toggle,{"aria-controls":"responsive-navbar-nav"}),Object(o.jsx)(c.a.Collapse,{id:"responsive-navbar-nav",children:Object(o.jsx)(i.a,{className:"navbarNav",children:b.map((function(e){return Object(o.jsx)(i.a.Link,{className:"font-bold text-black",href:"/blog/tag?id=".concat(e.id),children:e.name})}))})})]})})}},160:function(e,t,a){},162:function(e,t,a){"use strict";a(1);var s,n=a(127),c=a(50),l=a(49).a.div(s||(s=Object(c.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=(a(105),a(106),a(107),a(514)),r=a(133),o=a(2);i.a.use([r.a]);t.a=function(){return Object(o.jsx)(l,{className:"mt-6",children:Object(o.jsx)(n.a,{children:Object(o.jsx)("div",{className:"slider-wrapper bg-black",children:Object(o.jsx)("div",{className:"",children:Object(o.jsx)("div",{className:"max-w-7xl mx-auto pb-16 pt-48 md:px-16 px-8",children:Object(o.jsx)("div",{className:"grid md:grid-cols-1 text-center grid-cols-1 gap-x-8 gap-y-8",children:Object(o.jsxs)("div",{className:"content blogBanner",children:[Object(o.jsx)("h1",{className:"text-6xl font-bold text-white mt-32 mb-8",children:"Welcome to our blog"}),Object(o.jsxs)("p",{className:"text-light text-sm text-white mb-6",children:["stay updated with the newest info and development Stories, ",Object(o.jsx)("br",{}),"case studies and insights share by NCF"]}),Object(o.jsx)("button",{className:"text-white text-sm font-bold py-2 px-8 rounded",children:"Learn More"})]})})})})})})})}},171:function(e,t,a){"use strict";var s=a(4),n=a(17),c=a(1),l=a.n(c),i=a(3),r=a.n(i),o=a(26),d=a.n(o),b=a(15),j=["className","listClassName","cssModule","size","tag","listTag","aria-label"],m={children:r.a.node,className:r.a.string,listClassName:r.a.string,cssModule:r.a.object,size:r.a.string,tag:b.n,listTag:b.n,"aria-label":r.a.string},h=function(e){var t,a=e.className,c=e.listClassName,i=e.cssModule,r=e.size,o=e.tag,m=e.listTag,h=e["aria-label"],x=Object(n.a)(e,j),u=Object(b.j)(d()(a),i),p=Object(b.j)(d()(c,"pagination",((t={})["pagination-"+r]=!!r,t)),i);return l.a.createElement(o,{className:u,"aria-label":h},l.a.createElement(m,Object(s.a)({},x,{className:p})))};h.propTypes=m,h.defaultProps={tag:"nav",listTag:"ul","aria-label":"pagination"},t.a=h},172:function(e,t,a){"use strict";var s=a(4),n=a(17),c=a(1),l=a.n(c),i=a(3),r=a.n(i),o=a(26),d=a.n(o),b=a(15),j=["active","className","cssModule","disabled","tag"],m={active:r.a.bool,children:r.a.node,className:r.a.string,cssModule:r.a.object,disabled:r.a.bool,tag:b.n},h=function(e){var t=e.active,a=e.className,c=e.cssModule,i=e.disabled,r=e.tag,o=Object(n.a)(e,j),m=Object(b.j)(d()(a,"page-item",{active:t,disabled:i}),c);return l.a.createElement(r,Object(s.a)({},o,{className:m}))};h.propTypes=m,h.defaultProps={tag:"li"},t.a=h},173:function(e,t,a){"use strict";var s=a(4),n=a(17),c=a(1),l=a.n(c),i=a(3),r=a.n(i),o=a(26),d=a.n(o),b=a(15),j=["className","cssModule","next","previous","first","last","tag"],m={"aria-label":r.a.string,children:r.a.node,className:r.a.string,cssModule:r.a.object,next:r.a.bool,previous:r.a.bool,first:r.a.bool,last:r.a.bool,tag:b.n},h=function(e){var t,a=e.className,c=e.cssModule,i=e.next,r=e.previous,o=e.first,m=e.last,h=e.tag,x=Object(n.a)(e,j),u=Object(b.j)(d()(a,"page-link"),c);r?t="Previous":i?t="Next":o?t="First":m&&(t="Last");var p,g=e["aria-label"]||t;r?p="\u2039":i?p="\u203a":o?p="\xab":m&&(p="\xbb");var f=e.children;return f&&Array.isArray(f)&&0===f.length&&(f=null),x.href||"a"!==h||(h="button"),(r||i||o||m)&&(f=[l.a.createElement("span",{"aria-hidden":"true",key:"caret"},f||p),l.a.createElement("span",{className:"sr-only",key:"sr"},g)]),l.a.createElement(h,Object(s.a)({},x,{className:u,"aria-label":g}),f)};h.propTypes=m,h.defaultProps={tag:"a"},t.a=h},249:function(e,t,a){"use strict";var s=a(48),n=a(1),c=a(21),l=a(460),i=a(461),r=(a(146),a(52),a(520)),o=a(2),d=r.a.Search;t.a=function(){var e=Object(n.useState)([]),t=Object(s.a)(e,2),a=t[0],r=t[1],b=Object(n.useState)([]),j=Object(s.a)(b,2),m=j[0],h=j[1];Object(n.useEffect)((function(){fetch("".concat(c.SERVER_URL,"/blog/all")).then((function(e){return e.json()})).then((function(e){console.log(e.message,"json"),200===e.status?r(e.data.data):console.log("Oops couldn't fetch data")}))}),[]),Object(n.useEffect)((function(){fetch("".concat(c.SERVER_URL,"/blog/category")).then((function(e){return e.json()})).then((function(e){console.log(e.message,"json"),200===e.status?h(e.data):console.log("Oops couldn't fetch data")}))}),[]);var x=a.slice(0,3);return Object(o.jsx)("nav",{children:Object(o.jsxs)("div",{className:"",children:[Object(o.jsxs)("div",{className:"p-3 mb-3 shadow-md rounded",children:[Object(o.jsx)("span",{className:"pr-1 text-md text-black font-bold flex-1",children:"Search"}),Object(o.jsx)("div",{className:"pl-4 py-5",children:Object(o.jsx)(d,{placeholder:"Type Here",className:"rounded",size:"large",onSearch:function(e){console.log(e),window.location.href="".concat(c.CLIENT_URL,"blog/search?q=").concat(e)}})})]}),Object(o.jsxs)("div",{className:"p-3 mb-3 shadow-md rounded",children:[Object(o.jsx)("span",{className:"pr-1 text-md text-black font-bold flex-1",children:"Categories"}),Object(o.jsx)("div",{className:"pl-4",children:m.map((function(e){return Object(o.jsx)("a",{className:"block text-sm font-medium my-3 text-black px-4 py-2",href:"/blog/tag?id=".concat(e.id),children:e.name})}))})]}),Object(o.jsxs)("div",{className:"pl-4 pt-3 shadow-md rounded",children:[Object(o.jsx)("span",{className:"pr-1 text-md text-black font-bold flex-1",children:"Recent Post"}),x.map((function(e){return Object(o.jsxs)(l.a,{xs:"2",className:"w-full shadow-sm mt-3",children:[Object(o.jsx)(i.a,{className:"w-full blogSidebarcardImg",md:"3",children:Object(o.jsx)("img",{src:"https://admin.ncfnigeria.org/images/blog/".concat(e.image),alt:"Card image cap"})}),Object(o.jsxs)(i.a,{md:"9",className:" py-3",children:[Object(o.jsx)("h4",{className:"text-xs",children:e.title}),Object(o.jsx)("a",{href:"blog/post?id=".concat(e.id),children:Object(o.jsx)("h4",{className:"text-sm text-bold",children:"Learn More"})})]})]})}))]})]})})}},503:function(e,t,a){"use strict";a.r(t);var s=a(48),n=a(1),c=a(21),l=a(162),i=a(159),r=(a(52),a(249)),o=(a(104),a(146),a(197)),d=a(282),b=a(198),j=a(199),m=a(171),h=a(172),x=a(173),u=a(2);t.default=function(){var e=Object(n.useState)({picture:""}),t=(Object(s.a)(e,1)[0],Object(n.useState)(1)),a=Object(s.a)(t,2),p=a[0],g=a[1],f=Object(n.useState)(2),O=Object(s.a)(f,2),v=O[0],N=(O[1],Object(n.useState)([])),w=Object(s.a)(N,2),y=w[0],k=w[1],S=Object(n.useState)(!1),E=Object(s.a)(S,2),R=(E[0],E[1],window.location.search),L=new URLSearchParams(R).get("id");Object(n.useEffect)((function(){fetch("".concat(c.SERVER_URL,"/blog/by-category/").concat(L)).then((function(e){return e.json()})).then((function(e){console.log(e.message,"json"),200===e.status?k(e.data.data):console.log("Oops couldn't fetch data")}))}),[]);for(var M=p*v,C=M-v,T=y.slice(C,M),z=y.length,U=[],P=1;P<=Math.ceil(z/v);P++)U.push(P);return Object(u.jsxs)("div",{children:[Object(u.jsx)(l.a,{}),Object(u.jsx)(i.a,{}),Object(u.jsx)("div",{className:"w-full md:px-16",children:Object(u.jsxs)("div",{className:"grid md:grid-cols-12 md:gap-x-0 gap-y-2 z-index-3",children:[Object(u.jsxs)("div",{className:"md:col-span-8 col-span-12 p-4",children:[Object(u.jsx)("div",{className:"grid md:grid-cols-1 gap-y-8",children:T.map((function(e){return Object(u.jsx)("div",{className:"rounded overflow-hidden h-full shadow-md h-full",children:Object(u.jsxs)(o.a,{children:[Object(u.jsx)(d.a,{top:!0,width:"100%",src:"https://admin.ncfnigeria.org/images/blog/".concat(e.image),alt:"Card image cap"}),Object(u.jsxs)(b.a,{className:"px-6 py-4",children:[Object(u.jsx)("p",{className:" text-sm mt-4 mb-4",children:Object(u.jsx)("span",{className:"font-bold uppercase",children:e.cat.name})}),Object(u.jsx)(j.a,{className:"font-bold text-2xl mb-2",children:e.title}),Object(u.jsx)("div",{className:"cardLinks pt-5",children:Object(u.jsx)("a",{className:"text-black",href:"blog/post?id=".concat(e.id),children:"Read More"})})]})]})})}))}),Object(u.jsx)("div",{className:"pt-5",children:Object(u.jsx)(m.a,{size:"lg",children:U.map((function(e){return Object(u.jsx)(h.a,{children:Object(u.jsx)(x.a,{onClick:function(){return g(e)},className:"text-black text-bold",children:Object(u.jsx)(u.Fragment,{children:e})})})}))})})]}),Object(u.jsx)("aside",{className:"md:col-span-4 col-span-12 min-h-screen py-4 border-0 border-r border-solid border-gray-200",children:Object(u.jsx)(r.a,{})})]})})]})}}}]); //# sourceMappingURL=22.f1cf7fd5.chunk.js.map