1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[122],{4759:function(e,n,i){"use strict";i.d(n,{Z:function(){return m}});var s=i(5893),t=i(7294),a=i(1436),c=i(7814),o=i(1163),l=function(){var e=(0,o.useRouter)();return(0,s.jsxs)("div",{className:"admin-header",children:[(0,s.jsx)("div",{className:"left",children:(0,s.jsx)(c.G,{icon:a.xiG})}),(0,s.jsxs)("div",{className:"right",children:[(0,s.jsx)(c.G,{icon:a.qmU}),(0,s.jsx)(c.G,{icon:a.jLD,onClick:function(){localStorage.removeItem("token"),e.push("/login")}})]})]})},r=i(6024),d=i(9748),u=function(){var e=(0,o.useRouter)();return(0,s.jsxs)("div",{className:"sidebar",children:[(0,s.jsxs)("a",{className:"sidebar-logo",href:"/",children:[(0,s.jsx)(d.Z,{className:"mr-4",src:"/images/Logo.png"}),(0,s.jsx)("div",{children:"Whitepaper.io"})]}),(0,s.jsxs)("div",{className:"sidebar-user",children:[(0,s.jsx)("div",{className:"user-image-border",children:(0,s.jsx)("div",{className:"user-image",children:(0,s.jsx)(c.G,{icon:a.ILF})})}),(0,s.jsx)("div",{children:"Administrator"})]}),(0,s.jsxs)("div",{className:"sidebar-items flex flex-col",children:[(0,s.jsxs)("div",{className:"admin"===e.pathname.split("/").pop()?"menu-item active":"menu-item",onClick:function(){return e.push("/admin")},children:[(0,s.jsx)(c.G,{icon:r.gM}),(0,s.jsx)("span",{children:"Whitepapers"}),(0,s.jsx)(c.G,{icon:a.yOZ})]}),(0,s.jsxs)("div",{className:"seo"===e.pathname.split("/").pop()||"seo"===e.pathname.split("/").slice(-2)[0]?"menu-item active":"menu-item",onClick:function(){return e.push("/admin/seo")},children:[(0,s.jsx)(c.G,{icon:r.gM}),(0,s.jsx)("span",{children:"SEO"}),(0,s.jsx)(c.G,{icon:a.yOZ})]})]})]})},m=function(e){var n=e.children,i=(0,t.useRef)(null),a=(0,t.useRef)(null);return(0,t.useLayoutEffect)((function(){if(i.current&&a.current){var e=i.current.clientHeight;e<window.innerHeight&&(a.current.style.minHeight="".concat(window.innerHeight-e,"px"))}})),(0,s.jsxs)("div",{className:"min-h-screen",children:[(0,s.jsx)(u,{}),(0,s.jsxs)("div",{className:"admin-container",children:[(0,s.jsx)("div",{ref:i,children:(0,s.jsx)(l,{})}),(0,s.jsxs)("div",{ref:a,className:"admin-body",children:[(0,s.jsx)("div",{ref:a,className:"admin-background"}),n]})]})]})}},1431:function(e,n,i){"use strict";var s=i(5893);i(7294);n.Z=function(e){var n=e.display,i=e.title,t=e.message,a=e.onCancel,c=e.onSubmit;return n&&(0,s.jsx)("div",{className:"popup-bg",children:(0,s.jsxs)("div",{className:"popup-card",children:[(0,s.jsx)("div",{className:"admin-section-title",children:i}),(0,s.jsx)("div",{className:"admin-section-body mb-5",children:t}),(0,s.jsxs)("div",{className:"popup-actions",children:[(0,s.jsx)("button",{className:"mt-5 w-full whitepaper-btn bg-danger",onClick:function(){return a()},children:"Cancel"}),(0,s.jsx)("button",{className:"mt-5 w-full whitepaper-btn bg-success",onClick:function(){return c()},children:"OK"})]})]})})}},9748:function(e,n,i){"use strict";var s=i(5893);i(7294);n.Z=function(e){var n=e.src,i=e.alt,t=e.className,a=e.height,c=e.width,o=e.onClick;return(0,s.jsx)("img",{src:n,alt:i,className:t,width:c,height:a,onClick:o})}},7629:function(e,n,i){"use strict";i.r(n);var s=i(5893),t=i(7294),a=i(1436),c=i(7814),o=i(1163),l=i(4759),r=i(1431);n.default=function(){var e=(0,o.useRouter)(),n=(0,t.useState)(),i=n[0],d=n[1],u=e.query.id,m=(0,t.useState)(""),h=m[0],x=m[1],f=(0,t.useState)(""),p=f[0],g=f[1],j=(0,t.useState)(""),v=j[0],N=j[1],b=(0,t.useState)(""),y=b[0],S=b[1],w=(0,t.useState)({display:!1,message:"",onCancel:function(){},onSubmit:function(){}}),C=w[0],k=w[1],_=function(e){x(e.target.value)},O=function(e){g(e.target.value)},E=function(e){N(e.target.value)},D=function(e){S(e.target.value)};(0,t.useEffect)((function(){u&&fetch("".concat("https://api-new.whitepaper.io","/seo?coinId=").concat(u),{headers:{Authorization:"Bearer ".concat(localStorage.getItem("token"))}}).then((function(e){return e.json()})).then((function(e){e&&(d(e),x(e.coinSeoTitle),g(e.coinSeoDescription),N(e.docSeoTitle),S(e.docSeoDescription))}))}),[e]);return null!==i&&void 0!==i&&i.name?(0,s.jsxs)(l.Z,{children:[(0,s.jsxs)("div",{className:"page",children:[(0,s.jsxs)("div",{className:"breadcrumbs",children:[(0,s.jsx)("a",{className:"item cursor-pointer",href:"/admin",children:"Admin"}),(0,s.jsx)(c.G,{icon:a.yOZ}),(0,s.jsx)("a",{className:"item cursor-pointer",href:"/admin/seo",children:"SEO"}),(0,s.jsx)(c.G,{icon:a.yOZ}),(0,s.jsx)("div",{className:"item",children:i.name})]}),(0,s.jsxs)("div",{className:"w-full flex gap-10 items-center",children:[(0,s.jsx)("img",{alt:"",src:i.logo?"typeform_upload"===i.logo.type?i.logo.value:"https://res.cloudinary.com/dp2uu228v/image/upload/w_100,h_100,c_fill,dpr_2.0,f_auto/".concat(i.logo.value):"",className:"w-25 rounded-full"}),(0,s.jsx)("div",{className:"flex flex-col flex-1 gap-2",children:(0,s.jsx)("div",{className:"title text-white",children:i.name})}),(0,s.jsxs)("div",{className:"flex gap-2 h-max self-start",children:[(0,s.jsx)("button",{className:"whitepaper-btn bg-success",onClick:function(){k({display:!0,message:"Are you sure you want to save SEO Details for ".concat(i.name,"?"),onSubmit:function(){fetch("".concat("https://api-new.whitepaper.io","/seo"),{headers:{Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(localStorage.getItem("token"))},method:"POST",body:JSON.stringify({coinId:u,coinSeoTitle:h,coinSeoDescription:p,docSeoTitle:v,docSeoDescription:y})}).then((function(){e.push("/admin/seo"),k({display:!1,message:"",onCancel:function(){},onSubmit:function(){}})}))},onCancel:function(){k({display:!1,message:"",onCancel:function(){},onSubmit:function(){}})}})},children:"Save"}),(0,s.jsx)("button",{className:"whitepaper-btn bg-danger",onClick:function(){e.push("/admin/seo")},children:"Cancel"})]})]}),(0,s.jsx)("div",{className:"flex gap-3 w-full mt-10",children:(0,s.jsxs)("div",{className:"flex-1 flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"container flex flex-col",children:[(0,s.jsx)("div",{className:"admin-section-title mb-5",children:"Coin SEO Title"}),(0,s.jsx)("div",{className:"admin-section-body",children:(0,s.jsx)("input",{name:"coinSeoTitle",value:h,onChange:function(e){return _(e)},onBlur:function(e){return _(e)},className:"font-oxygen text-ss h-full placeholder-gray-800 bg-white text-gray-800 border border-gray-200 focus:outline-none block w-full rounded-lg px-5 py-2"})})]}),(0,s.jsxs)("div",{className:"container flex flex-col",children:[(0,s.jsx)("div",{className:"admin-section-title mb-5",children:"Coin SEO Description"}),(0,s.jsx)("div",{className:"admin-section-body",children:(0,s.jsx)("input",{name:"coinSeoDescription",value:p,onChange:function(e){return O(e)},onBlur:function(e){return O(e)},className:"font-oxygen text-ss h-full placeholder-gray-800 bg-white text-gray-800 border border-gray-200 focus:outline-none block w-full rounded-lg px-5 py-2"})})]}),(0,s.jsxs)("div",{className:"container flex flex-col",children:[(0,s.jsx)("div",{className:"admin-section-title mb-5",children:"Document SEO Title"}),(0,s.jsx)("div",{className:"admin-section-body",children:(0,s.jsx)("input",{name:"docSeoTitle",value:v,onCh
1ange:function(e){return E(e)},onBlur:function(e){return E(e)},className:"font-oxygen text-ss h-full placeholder-gray-800 bg-white text-gray-800 border border-gray-200 focus:outline-none block w-full rounded-lg px-5 py-2"})})]}),(0,s.jsxs)("div",{className:"container flex flex-col",children:[(0,s.jsx)("div",{className:"admin-section-title mb-5",children:"Document SEO Description"}),(0,s.jsx)("div",{className:"admin-section-body",children:(0,s.jsx)("input",{name:"docSeoDescription",value:y,onChange:function(e){return D(e)},onBlur:function(e){return D(e)},className:"font-oxygen text-ss h-full placeholder-gray-800 bg-white text-gray-800 border border-gray-200 focus:outline-none block w-full rounded-lg px-5 py-2"})})]})]})})]}),(0,s.jsx)(r.Z,{display:C.display,message:C.message,title:"",onCancel:C.onCancel,onSubmit:C.onSubmit})]}):(0,s.jsx)(s.Fragment,{})}},5789:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/seo/[id]",function(){return i(7629)}])},1163:function(e,n,i){e.exports=i(2441)}},function(e){e.O(0,[774,523,597,947,494],(function(){return n=5789,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
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.