1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1343],{11786:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/konten/artikel",function(){return a(46568)}])},6427:function(e,t,a){"use strict";a.d(t,{Z:function(){return u}});var i=a(4111),s=a(51438),r=a(52951),n=a(14924),l=a(88029),c=a(60460),o=a(85893),d=a(30381),h=a.n(d),p=a(67294),m=a(41664),g=a.n(m),k=a(84849);a(87782);var x=function(e){return(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"row",children:(0,o.jsx)("div",{className:"col-12",children:(0,o.jsx)(k.Z,{height:150})})}),(0,o.jsxs)("div",{className:"row",children:[(0,o.jsx)("div",{className:"col-3",children:(0,o.jsx)(k.Z,{})}),(0,o.jsx)("div",{className:"col-3",children:(0,o.jsx)(k.Z,{})}),(0,o.jsx)("div",{className:"col-3",children:(0,o.jsx)(k.Z,{})}),(0,o.jsx)("div",{className:"col-3",children:(0,o.jsx)(k.Z,{})})]}),(0,o.jsx)("div",{className:"row",children:(0,o.jsx)("div",{className:"col-12",children:(0,o.jsx)(k.Z,{height:50})})}),(0,o.jsx)("div",{className:"row",children:(0,o.jsx)("div",{className:"col-12",children:(0,o.jsx)(k.Z,{height:100})})}),(0,o.jsx)("div",{className:"row",children:(0,o.jsx)("div",{className:"col-12",children:(0,o.jsx)(k.Z,{})})})]})};a(29218);h().locale("id");var u=function(e){(0,l.Z)(a,e);var t=(0,c.Z)(a);function a(e){var r;return(0,s.Z)(this,a),r=t.call(this,e),(0,n.Z)((0,i.Z)(r),"getArticles",(function(e){var t=e.page,a=e.limit,i=r.props.kategori,s="".concat("https://apiweb.loyalty.alteacare.com").concat("/article"),n="/category/".concat(i),l="".concat(s).concat(i?n:"","?is_popular=false¤t_page=").concat(t,"&limit=").concat(a);fetch(l,{method:"GET",mode:"cors",headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then((function(e){var t=r.state.artikel,a="kategori-artikel"===r.props.page?t.concat(e.data.articles):t.concat(e.data.article),i="kategori-artikel"===r.props.page?e.data.total_page:e.data.meta.total_page;r.setState({artikel:a,totalPage:i})})).catch((function(e){}))})),(0,n.Z)((0,i.Z)(r),"nextPage",(function(){r.setState({page:r.state.page+1})})),r.state={isLoading:!1,artikel:[],totalPage:0,page:1,limit:8},r}return(0,r.Z)(a,[{key:"componentDidMount",value:function(){var e=this.state,t=e.page,a=e.limit;this.getArticles({page:t,limit:a})}},{key:"componentDidUpdate",value:function(e,t){var a=this.state,i=a.page,s=a.limit,r=this.props.page;t.page!==i&&this.getArticles({page:i,limit:"artikel"===r?8:s})}},{key:"render",value:function(){var e=this,t=this.state.isLoading,a="konten"===this.props.page?8:"homepage"===this.props.page?4:99999999;return(0,o.jsxs)("div",{className:"container",children:[(0,o.jsxs)("div",{className:"d-flex flex-row justify-content-between align-items-center artikel-padding section-artikel",children:[(0,o.jsx)("div",{className:"new-altea-title-homepage",children:"konten"===this.props.page?"Artikel Terbaru":"homepage"===this.props.page?"Artikel Kesehatan Terbaru":"artikel"===this.props.page?"Semua Artikel":""}),void 0!==this.props.kategori?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(o.Fragment,{children:"artikel"===this.props.page?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)("div",{className:"new-altea-lihat-semua",children:(0,o.jsx)(g(),{className:"nav-item",href:"konten"===this.props.page?"/konten/artikel":"/konten",children:"Lihat Semua"})})})})]}),void 0!==this.props.kategori&&(0,o.jsxs)("div",{className:"row mb-3",children:[(0,o.jsx)("div",{className:"col-12 konten-artikel-kategori",children:"Kategori"}),(0,o.jsx)("div",{className:"col-12 konten-artikel-kategori-title",children:this.props.kategori}),(0,o.jsxs)("div",{className:"col-12 d-flex flex-row",children:[(0,o.jsx)(g(),{href:"/konten/kategori/".concat(this.props.kategori,"/artikel"),passHref:!0,children:(0,o.jsx)("a",{className:"".concat("kategori-artikel"===this.props.page?"konten-artikel-kategori-button-active":"konten-artikel-kategori-button"),children:"Artikel"})}),(0,o.jsx)(g(),{href:"/konten/kategori/".concat(this.props.kategori,"/e-book"),passHref:!0,children:(0,o.jsx)("a",{className:"".concat("kategori-ebook"===this.props.page?"konten-artikel-kategori-button-active":"konten-artikel-kategori-button"),children:"E-book"})})]})]}),t?(0,o.jsxs)("div",{className:"row",children:[(0,o.jsx)("div",{className:"col-3",children:(0,o.jsx)(x,{})}),(0,o.jsx)("div",{className:"col-3",children:(0,o.jsx)(x,{})}),(0,o.jsx)("div",{className:"col-3",children:(0,o.jsx)(x,{})}),(0,o.jsx)("div",{className:"col-3",children:(0,o.jsx)(x,{})})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"row",children:this.state.artikel.length>0?this.state.artikel.map((function(t,i){var s;if(i<a)return(0,o.jsx)(g(),{href:"/konten/kategori/".concat(void 0===e.props.kategori?t.category:e.props.kategori,"/artikel/").concat(null===t||void 0===t?void 0:t.slug),passHref:!0,children:(0,o.jsx)("a",{className:"col-lg-3 col-sm-12",style:{cursor:"pointer"},children:(0,o.jsxs)("div",{className:"d-flex flex-column",children:[(0,o.jsx)("div",{className:"item-artikel-padding-bottom",children:(0,o.jsx)("img",{src:null===t||void 0===t?void 0:t.image,alt:"",className:"img-fluid",style:(s={borderRadius:8,height:144,width:"100%"},(0,n.Z)(s,"height","168px"),(0,n.Z)(s,"objectFit","cover"),s)})}),(0,o.jsx)("div",{className:"d-flex flex-wrap item-artikel-padding-bottom",children:(0,o.jsx)("span",{className:"new-altea-article-tag",children:null===t||void 0===t?void 0:t.category})}),(0,o.jsx)("div",{className:"new-altea-articles-title-articles item-artikel-padding-bottom",children:null===t||void 0===t?void 0:t.t
1itle}),(0,o.jsxs)("div",{style:{bottom:0},children:[(0,o.jsx)("div",{className:"new-altea-articles-deskripsi item-artikel-padding-bottom",children:null===t||void 0===t?void 0:t.metadata}),(0,o.jsx)("div",{className:"new-altea-articles-tanggal item-artikel-padding-bottom",children:h()(null===t||void 0===t?void 0:t.created_at).format("dddd, DD MMMM YYYY")})]})]})},i)},i)})):(0,o.jsxs)("span",{className:"pl-3",children:["Mohon maaf Artikel"," ",void 0!==this.props.kategori?"dengan kategori ".concat(this.props.kategori):""," ","tidak tersedia"]})}),("artikel"===this.props.page||"kategori-artikel"===this.props.page)&&this.state.totalPage>this.state.page&&(0,o.jsx)("div",{className:"d-flex flex-row justify-content-center m-3",children:(0,o.jsx)("div",{className:"next-page-button",onClick:function(){return e.nextPage()},children:"Lihat Selanjutnya"})})]})]})}}]),a}(p.Component)},46568:function(e,t,a){"use strict";a.r(t);var i=a(51438),s=a(52951),r=a(88029),n=a(60460),l=a(85893),c=a(67294),o=a(34683),d=a(29219),h=a(6427),p=a(1912),m=a(96458),g=a(6323),k=function(e){(0,r.Z)(a,e);var t=(0,n.Z)(a);function a(e){var s;return(0,i.Z)(this,a),(s=t.call(this,e)).state={breadcrumb:[{name:"Beranda",path:"".concat("https://alteacare.com","/"),status:"new-altea-breadcrumb-item"},{name:"Konten",path:"".concat("https://alteacare.com","/konten"),status:"new-altea-breadcrumb-item"},{name:"Artikel",path:"".concat("https://alteacare.com","/konten/artikel"),status:"new-altea-breadcrumb-item-active"}]},s}return(0,s.Z)(a,[{key:"render",value:function(){return(0,l.jsxs)("div",{className:"new-altea",children:[(0,l.jsx)(o.Z,{}),(0,l.jsxs)("main",{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(d.mP,{onClick:function(){return history.back()}}),(0,l.jsx)(g.Z,{}),(0,l.jsx)(p.Z,{breadcrumb:this.state.breadcrumb}),(0,l.jsx)(h.Z,{page:"artikel"})]}),(0,l.jsx)(m.Z,{})]})]})}}]),a}(c.Component);t.default=k}},function(e){e.O(0,[8834,6199,8975,1216,9774,2888,179],(function(){return t=11786,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.