PageSourceSearch

https://whitelabel-loyalty.com/_next/static/chunks/pages/posts-by-category-f9b1c221aac3da74.js

js whitelabel-loyalty.com collected 2026-09-24 17:39:21 UTC 12,276 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6009],{63782:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/posts-by-category",function(){return r(72544)}])},85918:function(e,t,r){"use strict";var n=r(85893);t.Z=function(){return(0,n.jsxs)("div",{className:"z-50 flex h-podcast-image w-full flex-col items-center justify-center overflow-hidden",children:[(0,n.jsx)("div",{className:"loader mb-4 h-12 w-12 rounded-full border-4 border-t-4 border-gray-200 text-black ease-linear"}),(0,n.jsx)("h2",{className:"text-center text-xl font-semibold",children:"Loading..."}),(0,n.jsx)("p",{className:"w-1/3 text-center",children:"This may take a few seconds, please don't close this page."})]})}},99001:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(85893),s=(r(67294),r(25675)),a=r.n(s),l=r(41664),o=r.n(l);function i(){return(0,n.jsxs)("div",{className:"flex h-full flex-col items-center justify-center space-y-4",children:[(0,n.jsx)(a(),{width:"74px",height:"78px",src:"/join-newsletter.svg",objectFit:"cover",objectPosition:"center"}),(0,n.jsx)("h2",{className:"title-font mb-2 text-2xl font-bold tracking-normal text-white",children:"4,000+ people read this to build better loyalty programs."}),(0,n.jsx)(o(),{href:"/newsletter-signup",passHref:!0,children:(0,n.jsxs)("a",{className:"rounded bg-primary-blue p-4 text-lg font-semibold capitalize text-white transition-colors duration-200 hover:bg-primary-blue","aria-label":"Join the Community",children:[(0,n.jsx)("span",{className:"sr-only",children:"Join the Community"}),"Join the Community"]})})]})}},37809:function(e,t,r){"use strict";r.d(t,{Z:function(){return k}});var n=r(47568),s=r(26042),a=r(70655),l=r(85893),o=r(94184),i=r.n(o),c=r(11163),d=r(45697),u=r.n(d),x=r(67294),h=r(76485),m=r(61608),f=r.n(m),p=r(41664),g=r.n(p),b=r(85249),v=function(e){var t=e.title,r=e.excerpt,n=e.slug,s=e.image,a=e.main_category,o=(0,c.useRouter)(),i=(null===a||void 0===a?void 0:a.slug)?"".concat(a.slug,"/").concat(n):n;return(0,l.jsx)(g(),{href:"/blog/".concat(i),"aria-label":t,children:(0,l.jsxs)("article",{className:"group flex flex-col items-center overflow-hidden rounded-xl md:flex-row md:bg-white",tabIndex:0,onKeyDown:function(e){"Enter"===e.key&&o.push("/blog/".concat(i))},children:[(0,l.jsx)("div",{className:"overflow-hidden rounded-bl-xl rounded-tl-xl md:w-1/2",children:s&&(0,l.jsx)(f(),{src:(0,b.T_)(s.url),alt:s.alternativeText||t,width:s.width,height:s.height,priority:!0,className:"h-full w-full object-cover object-center duration-300 ease-in-out group-hover:scale-110 lg:transition-all"})}),(0,l.jsxs)("div",{className:"py-3 pr-4 md:w-1/2 md:pl-6",children:[(0,l.jsx)("div",{className:"my-3 font-bold uppercase text-primary-blue",children:"Featured"}),(0,l.jsx)("h2",{onClick:function(){return o.push("/blog/".concat(i))},className:"title-font mb-2 text-2xl font-bold tracking-normal text-black transition-all duration-300 ease-in-out group-hover:text-primary-blue sm:text-xl",children:t}),(0,l.jsx)("p",{className:"post-excerpt mb-2 line-clamp-3 text-lg leading-relaxed text-black",children:r}),(0,l.jsx)(g(),{href:"/blog/".concat(i),passHref:!0,"aria-label":t,children:(0,l.jsxs)("a",{className:"hidden border border-primary-blue px-5 py-4 text-xl font-semibold text-primary-blue transition-colors duration-200 md:inline-block md:rounded-lg","aria-label":"Read blog",children:[(0,l.jsx)("span",{className:"sr-only",children:"Read more about"}),"Read blog"]})})]})]})})};v.propTypes={title:u().string,excerpt:u().string,slug:u().string,image:u().object,date:u().string,categories:u().array};var y=v,j=r(99001),w=r(88767),N=r(96720),_=function(e){var t=e.title,r=e.body,o=(0,x.useState)(null),d=o[0],u=o[1],m=(0,x.useState)(!0),f=m[0],p=m[1],g=(0,c.useRouter)().asPath.split("/")[1].split("?")[0],b=function(){var e=(0,n.Z)((function(){var e,t;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:if(!g)return[2];p(!0),r.label=1;case 1:return r.trys.push([1,4,5,6]),[4,h.J.get("/headers?page_slug=".concat(g))];case 2:return[4,r.sent().data];case 3:return e=r.sent(),u(e[0]||null),[3,6];case 4:return t=r.sent(),console.error("Failed to fetch header:",t),u(null),[3,6];case 5:return p(!1),[7];case 6:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}(),v=["blog","free-resources"].includes(g);(0,x.useEffect)((function(){t||r?p(!1):b()}),[g,t,r]);var _=t||(null===d||void 0===d?void 0:d.title)||"",k=r||(null===d||void 0===d?void 0:d.body)||"",P=(0,w.useQuery)(["featuredPost"],(function(){return(0,N.jE)()}),{keepPreviousData:!0,enabled:v}).data;if(f)return(0,l.jsx)("div",{className:"flex h-[213px] items-center justify-center bg-gray-100",children:(0,l.jsx)("div",{className:"mx-auto max-w-4xl px-6 lg:px-0",children:(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,l.jsx)("div",{className:"mb-4 h-8 w-96 animate-pulse bg-gray-300"}),(0,l.jsx)("div",{className:"mb-4 h-4 w-[600px] animate-pulse bg-gray-300"})]})})});var Z=d||{},T=Z.background,O=void 0===T?"light_blue":T,R=Z.text_color,E=void 0===R?"black":R,L=i()("space-y-4 border-b pt-16 text-center text-black",{"bg-gray-300":"gray"===O,"bg-white":"white"===O,"bg-mid-blue":"light_blue"===O,"bg-dark-blue":"dark_blue"===O,"bg-[linear-gradient(120.58deg,rgba(84,125,250,0.125)_16.68%,rgba(20,177,255,0.15)_87.46%)]":"gradient"===O});return(0,l.jsxs)("div",{style:{color:E},className:L,children:[(0,l.jsxs)("div",{className:"mx-auto max-w-4xl px-6 lg:px-0",children:[(0,l.jsx)("h1",{className:"mb-4 text-4xl font-bold capitalize tracking-normal md:text-5xl",children:_}),(0,l.jsx)("div",{className:"text-lg text-gray-400 lg:text-2xl",children:(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:k}})})]}),v&&(0,l.jsx)("div",{className:"relative z-20 mx-auto max-w-[1312px] px-6 md:!-mt-24 md:translate-y-2/3 xl:px-0",children:(0,l.jsxs)("div",{className:"grid gap-8 gap-x-8 md:grid-cols-2 lg:grid-cols-3",children:[(0,l.jsx)("div",{className:"rounded-xl md:shadow-lg lg:col-span-2",children:P&&(0,l.jsx)(y,(0,s.Z)({},P),P.id)}),(0,l.jsx)("div",{className:"col-span-1 hidden rounded-xl bg-black px-8 py-3 text-center md:block",children:(0,l.jsx)(j.Z,{})})]})})]})};_.propTypes={title:u().string,body:u().string};var k=_},91268:function(e,t,r){"use strict";var n=r(85893),s=r(28582),a=r(61608),l=r.n(a),o=r(41664),i=r.n(o),c=r(45697),d=function(e,t){var r,a,o,c,d,u,x,h=null!==e.main_category&&""!==e.main_category?"".concat(e.main_category.slug,"/").concat(e.slug):e.slug;return(0,n.jsxs)("div",{className:"slide-rp flex flex-col overflow-hidden border bg-white shadow hover:cursor-pointer hover:border-secondary ".concat(t&&"mx-4"),children:[(0,n.jsx)(i(),{href:"/blog/".concat(h),passHref:!0,children:(0,n.jsx)("a",{children:(0,n.jsx)(l(),{className:"w-full object-cover object-center md:h-36 lg:h-48",src:(null===e||void 0===e||null===(r=e.image)||void 0===r||null===(a=r.formats)||void 0===a||null===(o=a.medium)||void 0===o?void 0:o.url)||(null===e||void 0===e||null===(c=e.image)||void 0===c?void 0:c.url),alt:(null===e||void 0===e||null===(d=e.image)||void 0===d?void 0:d.alternativeText)||(null===e||void 0===e?void 0:e.title),width:null===e||void 0===e||null===(u=e.image)||void 0===u?void 0:u.width,height:null===e||void 0===e||null===(x=e.image)||void 0===x?void 0:x.height})})}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsxs)("div",{className:"p-6",children:[e.main_category&&(0,n.jsx)("div",{className:"mb-3 inline-block rounded-xl bg-gray-100 px-3 py-1 text-left text-xs font-semibold uppercase",children:e.main_category.name}),(0,n.jsx)(i(),{href:"/blog/".concat(h),children:(0,n.jsx)("a",{children:(0,n.jsx)("h3",{className:"title-font flex-1 font-bold uppercase text-gray-900 lg:text-lg",children:e.title})})}),(0,n.jsx)("div",{className:"justify-starttext-xs mt-4 mb-2 flex items-center text-gray-400",children:(0,n.jsxs)("div",{className:"pt-2",children:["Posted on \xa0",(0,n.jsx)("time",{dateTime:(0,s.Z)(new Date(null===e||void 0===e?void 0:e.date),"yyyy-MM-dd"),children:(0,s.Z)(new Date(null===e||void 0===e?void 0:e.date),"do LLL yyy")})]})}),(0,n.jsx)("div",{className:"post-excerpt mb-3 leading-relaxed line-clamp-2",dangerouslySetInnerHTML:{__html:e.excerpt}})]}),(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)("div",{className:"px-6 pb-6",children:(0,n.jsx)("div",{className:"flex flex-wrap items-center ",children:(0,n.jsx)(i(),{href:"/blog/".concat(h),children:(0,n.jsxs)("a",{className:"inline-flex items-center text-secondary hover:text-black md:mb-2 lg:mb-0",children:["Read More",(0,n.jsxs)("svg",{className:"ml-2 h-4 w-4",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M5 12h14"}),(0,n.jsx)("path",{d:"M12 5l7 7-7 7"})]})]})})})})})]})]})};d.propTypes={post:r.n(c)().object},t.Z=d},72544:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return y}});var n=r(47568);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}
1function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function l(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}var o=r(26042);function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function c(e){return i(e)}function d(e,t){return!t||"object"!==((r=t)&&r.constructor===Symbol?"symbol":typeof r)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var r}function u(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=c(e);if(t){var s=c(this).constructor;r=Reflect.construct(n,arguments,s)}else r=n.apply(this,arguments);return d(this,r)}}var x=r(70655),h=r(85893),m=r(67294),f=r(76485),p=r(85918),g=r(37809),b=r(91268),v=function(e){l(c,e);var t,r,a,i=u(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=i.call(this,e)).state={posts:[],isLoading:!0},t}return t=c,(r=[{key:"componentDidMount",value:function(){var e=this;return(0,n.Z)((function(){var t,r,n;return(0,x.__generator)(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,4,5]),[4,f.J.get("/posts?_where[categories.name]=".concat(e.props.category," "))];case 1:return[4,s.sent().data];case 2:return t=s.sent(),e.setState({category:t[0],posts:[]}),[3,5];case 3:return r=s.sent(),console.error(r),[3,5];case 4:return e.setState({isLoading:!1}),[7];case 5:return(n=e.state.category)&&e.setState({posts:n.posts}),[2]}}))}))()}},{key:"render",value:function(){return this.state.isLoading?(0,h.jsx)(p.Z,{}):this.state.category?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(g.Z,{title:"Category : ".concat(this.state.category.name),body:"".concat(this.state.category.posts.length>1?this.state.category.posts.length+" Posts Found":this.state.category.posts.length+" Post found")}),(0,h.jsx)("section",{className:"body-font text-black",children:(0,h.jsx)("div",{className:"container mx-auto my-12 max-w-[1312px] py-12",children:(0,h.jsx)("div",{className:"flex h-full flex-wrap",children:this.state.posts.map((function(e){return(0,h.jsx)(b.Z,(0,o.Z)({},e),e.id)}))})})})]}):(0,h.jsx)("div",{className:"mx-auto max-w-[1312px] py-12",children:(0,h.jsx)("p",{children:"No posts found with this category"})})}}])&&s(t.prototype,r),a&&s(t,a),c}(m.Component);v.getInitialProps=function(){var e=(0,n.Z)((function(e){var t;return(0,x.__generator)(this,(function(r){return t=e.query,[2,{category:t.category}]}))}));return function(t){return e.apply(this,arguments)}}();var y=v}},function(e){e.O(0,[5675,1608,8582,9774,2888,179],(function(){return t=63782,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.