1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[297],{25766:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/NewProject",function(){return c(22768)}])},22768:function(a,b,c){"use strict";c.r(b);var d=c(47568),e=c(34051),f=c.n(e),g=c(85893),h=c(67294),i=c(79762),j=c(4612),k=c(33441),l=c(11391),m=c(41664),n=c.n(m),o=c(99763),p=c(57304),q=c(11163),r=c.n(q),s=c(25675),t=c.n(s),u=c(98690),v=c.n(u),w=c(25934),x=function(){var a,b=(0,h.useState)(!1),c=b[0],e=b[1],m=(0,h.useState)(""),q=m[0],s=m[1],u=(0,h.useState)(!1),x=u[0],y=u[1],z=(0,h.useState)(""),A=z[0],B=z[1],C=(0,h.useState)(""),D=C[0],E=C[1],F=(0,h.useState)(""),G=F[0],H=F[1],I=(0,h.useState)("none"),J=I[0],K=I[1],L=(0,h.useState)(""),M=L[0],N=L[1],O=(0,h.useState)(""),P=O[0],Q=O[1],R=(0,h.useState)(""),S=R[0],T=R[1],U=(0,h.useState)(""),V=U[0],W=U[1],X=(0,h.useState)(!1),Y=X[0],Z=X[1],$="showcase-hub";v().config.update({accessKeyId:"AKIA2DFAAAPHQZ2E5RMO",secretAccessKey:"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"});var _,aa,ab,ac,ad=new(v()).S3({params:{Bucket:$},region:"ap-south-1"}),ae=(_=(0,d.Z)(f().mark(function a(b){var c,d;return f().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return c={ACL:"public-read",Body:b,Bucket:$,Key:(0,w.Z)()},a.prev=1,a.next=4,ad.upload(c).promise();case 4:return d=a.sent,a.abrupt("return",d);case 8:a.prev=8,a.t0=a.catch(1),console.log(a.t0);case 11:case"end":return a.stop()}},a,null,[[1,8]])})),function(a){return _.apply(this,arguments)}),af=(aa=(0,d.Z)(f().mark(function a(b){var c;return f().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,ae(b);case 2:c=a.sent,console.log(c),y(!0),e(!0),s(c.Location);case 7:case"end":return a.stop()}},a)})),function(a){return aa.apply(this,arguments)}),ag=(ab=(0,d.Z)(f().mark(function a(b){var c;return f().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,ae(b);case 2:c=a.sent,console.log(c),y(!0),e(!0),s(c.Location);case 7:case"end":return a.stop()}},a)})),function(a){return ab.apply(this,arguments)}),ah=(ac=(0,d.Z)(f().mark(function a(b){var c;return f().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,ae(b);case 2:c=a.sent,console.log(c),y(!0),e(!0),s(c.Location);case 7:case"end":return a.stop()}},a)})),function(a){return ac.apply(this,arguments)}),ai=function(){if(Z(!0),""===A||""===D||""===G||""===M||"none"===J)Z(!1),alert("Please fill all the fields");else{var a={uid:localStorage.getItem("showcasehub-token"),image:q,imagealt:A,title:A,description:D,builddate:G,projecttype:J,livelink:M,githublink:P,playstorelink:S,appstorelink:V};p.Z.post("/createproject",a).then(function(a){!0===a.data.status?(Z(!1),r().back()):(Z(!1),alert(a.data.result))})}};return(0,g.jsx)("div",{className:"h-full w-full",children:(0,g.jsx)("div",{className:"bg-gray-900 w-full h-full flex justify-center items-center",children:(0,g.jsxs)("div",{className:"bg-white rounded-md shadow h-full w-2/3 mt-10 mb-10",children:[(0,g.jsx)("div",{className:"bg-gray-100 rounded-tl-md rounded-tr-md px-4 md:px-8 md:py-4 py-7 flex items-center justify-between",children:(0,g.jsx)("p",{className:"text-base font-semibold",children:"Create New Project"})}),(0,g.jsxs)("div",{className:"px-4 md:px-10 pt-6 md:pt-12 md:pb-4 pb-7",children:[(0,g.jsx)("div",{className:"flex flex-col items-center justify-center",children:(0,g.jsx)(o.b,{handleChange:af,name:"file",types:["JPG","PNG","GIF"],onDrop:ag,onSelect:ah,multiple:!1,children:(0,g.jsx)("div",{className:"h-full w-full bg-white mr-10 rounded-md p-5",children:!1===c?(0,g.jsx)("div",{className:"border-dotted border-4 border-light-blue-500 h-full rounded-md w-full flex flex-col items-center justify-center p-5 cursor-pointer",children:(0,g.jsx)("p",{className:"w-full text-center",children:"Drag your photo here to start uploading"})}):!0===x?(0,g.jsxs)("div",{children:[(0,g.jsx)(t(),{src:q,alt:"file",height:300,width:500}),(0,g.jsx)("div",{className:"text-red-600 text-center",children:"Files uploaded successfully"})]}):(0,g.jsx)("div",{className:"text-red-600 text-center",children:"Files not uploaded"})})})}),(0,g.jsxs)("div",{className:"w-full flex items-center justify-center gap-3 flex-wrap mt-10",children:[(0,g.jsx)("div",{className:"w-96",children:(0,g.jsxs)(i.NI,{className:"border-black",isRequired:!0,children:[(0,g.jsx)(i.lX,{children:"Title"}
1),(0,g.jsx)(j.II,{type:"text",onChange:function(a){B(a.target.value)}})]})}),(0,g.jsx)("div",{className:"w-96",children:(0,g.jsxs)(i.NI,{className:"border-black",isRequired:!0,children:[(0,g.jsx)(i.lX,{children:"Description"}),(0,g.jsx)(k.g,{borderColor:"black",borderRadius:"10px",onChange:function(a){E(a.target.value)},placeholder:"Desciption of the project",size:"sm"})]})}),(0,g.jsx)("div",{className:"w-96",children:(0,g.jsxs)(i.NI,{className:"border-black",isRequired:!0,children:[(0,g.jsx)(i.lX,{children:"Build Date"}),(0,g.jsx)(j.II,{type:"date",onChange:function(a){H(a.target.value)}})]})}),(0,g.jsx)("div",{className:"w-96",children:(0,g.jsxs)(i.NI,{className:"border-black",isRequired:!0,children:[(0,g.jsx)(i.lX,{children:"Project Type"}),(0,g.jsxs)(l.Ph,{placeholder:"Select option",borderColor:"black",onChange:function(a){K(a.target.value)},children:[(0,g.jsx)("option",{value:"Web App",children:"Web App"}),(0,g.jsx)("option",{value:"Mobile App",children:"Mobile App"})]})]})}),(0,g.jsx)("div",{className:"w-96",children:(0,g.jsxs)(i.NI,{className:"border-black",isRequired:!0,children:[(0,g.jsx)(i.lX,{children:"Live Link"}),(0,g.jsx)(j.II,{type:"text",onChange:function(a){N(a.target.value)}})]})}),(0,g.jsx)("div",{className:"w-96",children:(0,g.jsxs)(i.NI,{className:"border-black",children:[(0,g.jsx)(i.lX,{children:"Github Link"}),(0,g.jsx)(j.II,{type:"email",onChange:function(a){Q(a.target.value)}})]})}),(0,g.jsx)("div",{className:"w-96",children:(0,g.jsxs)(i.NI,{className:"border-black",children:[(0,g.jsx)(i.lX,{children:"PlayStore Link"}),(0,g.jsx)(j.II,{type:"email",onChange:function(a){T(a.target.value)}})]})}),(0,g.jsx)("div",{className:"w-96",children:(0,g.jsxs)(i.NI,{className:"border-black",children:[(0,g.jsx)(i.lX,{children:"Appstore Link"}),(0,g.jsx)(j.II,{type:"email",onChange:function(a){W(a.target.value)}})]})})]}),(0,g.jsxs)("div",{className:"flex items-center justify-between mt-9",children:[(0,g.jsx)(n(),{href:a="/",children:(0,g.jsx)("button",{className:"px-6 py-3 bg-gray-400 hover:bg-gray-500 shadow rounded text-sm text-white cursor-pointer",children:"Cancel"})}),(0,g.jsxs)("button",{className:"px-6 py-3 bg-indigo-700 hover:bg-opacity-80 shadow rounded text-sm text-white cursor-pointer flex items-center",onClick:ai,children:[Y?(0,g.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,g.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokWidth:"4"}),(0,g.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):"","Add Project"]})]})]})]})})})};b.default=x},57304:function(a,b,c){"use strict";var d=c(9669),e=c.n(d),f=e().create({baseURL:"https://showcase-hub.netlify.app/api"});b.Z=f},28022:function(){}},function(a){a.O(0,[586,664,400,398,427,774,888,179],function(){var b;return a(a.s=25766)}),_N_E=a.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.