PageSourceSearch

https://www.quantumcybersolutions.com/_next/static/chunks/pages/admin/UploadBlog-f84d76ab8ca834d9.js

js quantumcybersolutions.com collected 2026-10-08 06:59:07 UTC 3,775 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1433],{31529:function(e,a,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/UploadBlog",function(){return r(72155)}])},72155:function(e,a,r){"use strict";r.r(a),r.d(a,{__N_SSP:function(){return i}});var t=r(85893),l=r(67294),o=r(34687),s=r(77854),n=r(41857),i=!0;a.default=e=>{let{articles:a}=e,[r,i]=(0,l.useState)(!1),[d,c]=(0,l.useState)(""),[u,p]=(0,l.useState)(a),[h,m]=(0,l.useState)({title:"",description:"",articleUrl:"",image:"",meta_tags:"",QCSURL:""}),g=e=>{m(a=>({...a,[e.target.name]:e.target.value}))},x=async()=>{try{let e=await fetch("https://quantumcybersolutions.com/api/Blogdata"),a=await e.json();p(a)}catch(e){console.error("Error fetching blogs:",e)}},b=async e=>{e.preventDefault();try{let e=await fetch("https://quantumcybersolutions.com/api/WriteBlog",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(!e.ok){let a=await e.json();throw Error(a.error||"Error in uploading")}let a=await e.json();alert(a.message),await x()}catch(e){console.error("Failed to upload blog:",e),alert(e.message||"Failed to upload blog")}};return(0,t.jsxs)(t.Fragment,{children:[!1===r&&(0,t.jsxs)(o.E.div,{variants:{hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},initial:"hidden",animate:"visible",exit:"exit",className:"p-8 bg-white/80 backdrop-blur-md shadow-xl rounded-xl",children:[(0,t.jsx)("p",{children:"Input Password to upload a blog!"}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),"QCSCAREERSqcscareers1!"===d?i(!0):alert("Incorrect password")},children:[(0,t.jsx)(s.Y,{placeholder:"Enter password",onChange:e=>c(e.target.value),size:"lg",className:"mb-4 text-xl"}),(0,t.jsx)(o.E.div,{variants:{hover:{scale:1.1},tap:{scale:.95}},whileHover:"hover",whileTap:"tap",children:(0,t.jsx)(n.A,{colorScheme:"blue",size:"lg",type:"submit",children:"Submit"})})]})]}),!0===r&&(0,t.jsxs)("div",{className:"container mx-auto p-8",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold underline mb-5",children:"Upload Blog"}),(0,t.jsxs)("form",{onSubmit:b,className:"space-y-4",children:[(0,t.jsx)("input",{type:"text",name:"title",placeholder:"Title",onChange:g,className:"w-full p-2 border border-gray-300 rounded",required:!0}),(0,t.jsx)("textarea",{name:"description",placeholder:"Description",onChange:g,className:"w-full p-2 border border-gray-300 rounded",required:!0}),(0,t.jsx)("input",{type:"text",name:"articleUrl",placeholder:"Article URL",onChange:g,className:"w-full p-2 border border-gray-300 rounded",required:!0}),(0,t.jsx)("input",{type:"text",name:"image",placeholder:"Image URL",onChange:g,className:"w-full p-2 border border-gray-300 rounded"}),(0,t.jsx)("input",{type:"text",name:"meta_tags",placeholder:"Meta Tags",onChange:g,className:"w-full p-2 border border-gray-300 rounded"}),(0,t.jsx)("input",{type:"text",name:"QCSURL",placeholder:"QCS URL",onChange:g,className:"w-full p-2 border border-gray-300 rounded"}),(0,t.jsx)("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Upload Blog"})]})]}),(0,t.jsxs)("div",{className:"container mx-auto p-8",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold underline mb-5",children:"All Blogs"}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:a.map((e,a)=>(0,t.jsxs)("div",{className:"bg-white rounded-xl p-4 shadow-lg",children:[(0,t.jsx)("h3",{className:"text-xl font-bold",children:e.title}),(0,t.jsx)("p",{children:e.description}),(0,t.jsx)("a",{href:e.articleUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800",children:"Read more"})]},a))})]})]})}}},function(e){e.O(0,[3423,7854,2888,9774,179],function(){return e(e.s=31529)}),_N_E=e.O()}]);

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.