(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[106],{3328:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/2020",function(){return r(2543)}])},3583:function(e,t){"use strict";t.Z={src:"/_next/static/media/hnfulllogo.531e15fc.png",height:100,width:619,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAABCAMAAADU3h9xAAAAD1BMVEUREREJCQkQEBBGRkaYmJiJbnBwAAAABXRSTlMyPEZE0MWmA+kAAAAJcEhZcwAACxMAAAsTAQCanBgAAAARSURBVAiZY2BhZmRgZGBiAAAATAAMtwDS4wAAAABJRU5ErkJggg=="}},2543:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return O}});var n=r(6042),s=r(9396),a=r(828),i=r(9815),o=r(5893),l=r(7294),c=r(6677),d=r(6690),m=r(2857),x=r(1042),u=r(8200),h=r(5675),g=r.n(h),p={src:"/_next/static/media/2020FullLogo.7d16a7b6.png",height:3199,width:2877,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAMAAAAC2hU0AAAAHlBMVEUA/wAA/wAA/wAA/wBMaXEA/wAA/wAA/wAA/wAA/wAi783eAAAACnRSTlNyHTwzAFhLZA1+nsELqgAAAAlwSFlzAAAsSgAALEoBd3p0TQAAAC9JREFUCJkFwYcBACAMwzBntMD/DyPRm13ExbqBp7YNqxgO4c0AM2NHVEeeUrNWPxjdALs6Sh/wAAAAAElFTkSuQmCC"},f=r(3583),w=function(e){var t=e.isVotingOpen,r=(0,l.useState)(0),n=r[0],s=r[1],a=(0,l.useState)(0),i=a[0],c=a[1],d=(0,l.useState)(0),m=d[0],x=d[1],u=(0,l.useState)(0),h=u[0],g=u[1],p=(0,l.useState)(new Date("01/26/2022 23:59:59")),f=p[0],w=(p[1],(0,l.useState)(!1)),A=(w[0],w[1]),b=(0,l.useState)(!1),v=b[0],j=(b[1],(0,l.useState)(!0)),y=j[0];j[1];(0,l.useEffect)((function(){var e=new Date;f.getTime()-e.getTime()<0?A(!0):N()}),[t]);var N=function(){var e=setInterval((function(){var e=new Date,t=f.getTime()-e.getTime(),r=Math.floor(t/864e5);s(r);var n=Math.floor(t%864e5/36e5);c(n);var a=Math.floor(t%36e5/6e4);x(a);var i=Math.floor(t%6e4/1e3);g(i)}),1e3);return function(){return clearInterval(e)}};return(0,o.jsxs)(o.Fragment,{children:[t&&(0,o.jsxs)("div",{className:" w-[320px] sm:w-[275px] lg:w-[320px] flex flex-col justify-center text-center sm:mr-0 mx-auto sm:ml-auto font-display mt-4 text-lg",children:[(0,o.jsxs)("p",{className:" dark:text-green-700 text-green-800 sm:text-right text-center mb-2",children:["Voting ends in"," "]}),(0,o.jsxs)("div",{className:"flex justify-center bg-transparent dark:bg-green-800 text-green-700 dark:text-green-600",children:[(0,o.jsxs)("p",{className:"p-1 border-2 border-green-700 dark:border-green-700 border-r-0 w-[5rem]",children:[n," ",(0,o.jsx)("span",{className:"text-sm",children:"D"})]}),(0,o.jsxs)("p",{className:"p-1 border-2 border-green-700 dark:border-green-700 border-r-0 w-[5rem]",children:[i,(0,o.jsx)("span",{className:"text-sm",children:"H"})]}),(0,o.jsxs)("p",{className:"p-1 border-2 border-green-700 dark:border-green-700 border-r-0 w-[5rem]",children:[m," ",(0,o.jsx)("span",{className:"text-sm",children:"M"})]}),(0,o.jsxs)("p",{className:"p-1 border-2 border-green-700 dark:border-green-700 w-[5rem]",children:[h," ",(0,o.jsx)("span",{className:"text-sm",children:"s"})]})]})]}),y&&(0,o.jsx)("div",{className:"bg-gradient-to-l from-transparent via-white dark:text-black to-transparent h-30",children:(0,o.jsxs)("p",{className:"p-3 text-sm xl:text-xl text-center font-display",children:["Congratulations ",(0,o.jsx)("br",{})," 2020 ",(0,o.jsx)("br",{})," award Winners!"]})}),v&&(0,o.jsxs)("div",{className:" w-full sm:w-[275px] md:w-[200px] lg:w-[300px] xl:w-[450px] flex flex-col justify-center text-center sm:mr-0 mx-auto sm:ml-auto font-display mt-4 text-lg",children:[(0,o.jsxs)("p",{className:" dark:text-green-700 text-green-800 sm:text-right text-center mb-2",children:["Thank you for voting!"," "]}),(0,o.jsx)("div",{className:"flex justify-center bg-transparent dark:bg-green-800 text-green-700 dark:text-gray-200",children:(0,o.jsx)("p",{className:"p-1 border-2 border-green-700 dark:border-gray-200 w-[30rem]",children:(0,o.jsx)("span",{className:"text-sm",children:"The voting Period has Ended. Results will be announced on february 14th!"})})})]})]})},A=(r(5657),r(1163)),b=function(e){e.count;var t=e.isVotingOpen,r=(0,l.useState)([]),n=(r[0],r[1]),s=(0,a.Z)((0,c.Kx)(x.Z.firestore().collection("noonies-ads"),{snapshotListenOptions:{includeMetadataChanges:!0}}),3),i=s[0],d=s[1],u=s[2];(0,A.useRouter)().pathname;(0,l.useEffect)((function(){if(u)throw new Error(u.message);if(!d&&!(null===i||void 0===i?void 0:i.empty)){var e=null===i||void 0===i?void 0:i.docs.map((function(e){return e.data()}));e&&n(e)}}),[i,d,u]);return(0,o.jsx)("div",{className:"bg-gradient-to-b from-[#d2f8d2] via-[white] to-[#d2f8d2] pt-5 md:p-5 md:pb-0 min-h-[30rem] lg:min-h-[40vh] ",children:(0,o.jsx)(m.Z,{children:(0,o.jsx)("div",{className:"flex flex-col",children:(0,o.jsxs)("div",{className:"mb-auto sm:mb-0 pt-1 flex flex-col justify-center sm:flex-row sm:justify-between content-between",children:[(0,o.jsx)("div",{className:"flex flex-col justify-center w-[500px]",children:(0,o.jsx)(g(),{src:p,alt:"Noonies logo",layout:"responsive"})}),(0,o.jsxs)("div",{className:"sm:max-w-[50%] sm:ml-3 flex flex-col justify-center ",children:[(0,o.jsxs)("h1",{className:"mx-auto sm:mx-0 max-w-[400px] lg:max-w-[500px] min-w-[300px] mb-4 sm:mb-4 font-display text-3xl sm:text-3xl md:text-3xl lg:text-4xl xl:text-5xl text-center sm:text-right text-gray-800",children:["The ",(0,o.jsx)("span",{className:"text-[green]",children:"greenest"})," awards in tech"]}),(0,o.jsx)("p",{className:"font-semibold mb-4 text-center sm:text-right sm:text-lg text-gray-800",children:"Presented By"}),(0,o.jsx)("div",{className:"w-[20rem] bg-gradient-to-r from-transparent sm:from-[lightgreen] via-green-[lightgreen] rounded-2xl to-transparent p-2 sm:w-[15rem] xl:w-[20rem] mx-[auto] sm:mr-0 sm:ml-[auto]",children:(0,o.jsx)(g(),{src:f.Z,alt:"hnLogo",layout:"responsive"})}),(0,o.jsx)("div",{className:"mt-7 sm:ml-[auto]",children:(0,o.jsx)(w,{isVotingOpen:t})}),!d&&(0,o.jsxs)("div",{className:" flex flex-col justify-center mb-5 md:ml-auto",children:[(0,o.jsx)("h2",{className:"text-black font-bold text-sm sm:text-md text-center lg:text-right my-5",children:"With special thanks to our sponsors"}),(0,o.jsx)("div",{className:"flex lg:flex justify-around flex-wrap-reverse md:ml-[auto] from-transparent rounded-2xl via-green-700 to-transparent p-2",children:[{logo:"avast.png",name:"avast",url:"https://www.avast.com/secure-browser?brcmpgid=6307"},{logo:"bybit.png",name:"bybit",url:"https://www.bybit.com/en-US/task-center/pre_login/?medium=paid_banner&source=hackernoon&channel=mkt_&campaign=600welcomebonusv1&term=banner&content=en_soty&dtpid=1635843340600"},{logo:"techDomains.png",name:"techDomains",url:"https://get.tech/build-the-future"}].map((function(e,t){return(0,o.jsx)("div",{className:"w-[7rem] sm:w-[4rem] md:w-[4.7rem] lg:w-[5rem] xl:w-[8rem] mt-5 lg:my-auto sm:my-0 sm:mx-3 sm:mb-0 grid place-items-center ",children:(0,o.jsx)("a",{href:e.url,target:"_blank",className:"transition ease-in-out hover:scale-105",rel:"noreferrer",children:e.logo&&(0,o.jsx)("div",{className:"avast.png"===e.logo?"w-[128px] h-[40px] sm:w-[90px] sm:h-[28px] xl:w-[128px] xl:h-[40px] relative":"bybit.png"===e.logo?"w-[101px] h-[40px] sm:w-[75px] sm:h-[28px] xl:w-[101px] xl:h-[40px] relative":"w-[101px] h-[50px] xl:w-[101px] xl:h-[50px] sm:w-[70px] sm:h-[35px] relative",children:(0,o.jsx)(g(),{src:"/assets/banner-icons/".concat(e.logo),alt:e.name,layout:"fill"})})})},t)}))})]})]})]})})})})},v=r(1172),j=r(3447),y=r(8390),N=r(3253),k=r.n(N),Z=r(6261),E=r(6731);function S(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(Boolean).join(" ")}var T=function(e){var t=e.isHome,r=(0,l.useState)(!1),n=r[0],s=r[1],i=(0,a.Z)((0,c.d4)(x.Z.firestore().collection("noonies-categories"),{snapshotListenOptions:{includeMetadataChanges:!0}}),3),d=i[0],m=i[1];i[2];return m?null:(0,o.jsxs)("div",{className:"flex sticky p-1 pt-0 top-[4rem] z-20 sm:hidden bg-trasparent ",children:[(0,o.jsxs)(j.v,{as:"div",className:"bg-white dark:bg-green-800 w-[75%]",children:[(0,o.jsx)("div",{className:"",children:(0,o.jsxs)(j.v.Button,{className:"inline-flex justify-center align-center p-20 bg-transparent py-2 text-md font-bold text-green-900 dark:text-green-200 dark:hover:bg-green-800 sm:hidden",children:["Award Categories",(0,o.jsx)("i",{className:"far fa-caret-down -mr-1 ml-2 w-5"})]})}),(0,o.jsx)(y.u,{as:l.Fragment,enter:"transition ease-out duration-50",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,o.jsx)(j.v.Items,{className:"origin-top-left relative left-0 mt-2 border-[5px] bg-transparent border-green-600 dark:border-green-600 w-[100%] shadow-2xl",children:(0,o.jsx)("div",{className:"py-1",children:null===d||void 0===d?void 0:d.map((function(e){return(0,o.jsx)(j.v.Item,{children:t?function(t){var r=t.active;return(0,o.jsx)(Z.rU,{to:e.slug,smooth:!0,duration:200,offset:-150,className:S(r?"bg-green-700 h-10 bg-opacity-50 text-white dark:text-green-200 grid place-items-center":"text-green-800","px-4 py-2 text-lg text-center font-bold h-16 grid place-items-center dark:hover:text-white dark:text-green-200"),children:e.title})}:function(t){var r=t.active;return(0,o.jsx)("a",{href:"/category/".concat(e.slug),className:S(r?"bg-green-700 h-10 bg-opacity-50 text-white dark:text-green-200 grid place-items-center":"text-green-800","px-4 py-2 text-lg text-center font-bold h-16 grid place-items-center dark:hover:text-white dark:text-green-200"),children:e.title})}},e.slug)}))})})})]}),(0,o.jsx)("div",{className:" w-[30%] text-center ",children:(0,o.jsxs)("button",{className:"bg-white dark:bg-green-800 border-2 w-[100%] border-white dark:border-green-800 text-newGreen-medium font-semibold px-3 py-2 hover:bg-white",onClick:function(){return s(!0)},children:[(0,o.jsx)("i",{className:"far fa-search mr-2"}),"Search..."]})}),(0,o.jsx)(k(),{isOpen:n,onRequestClose:function(){return s(!1)},children:(0,o.jsx)(E.Z,{})})]})},B=r(6685),C=r(9008),M=r.n(C),_=r(2962),R=r(9953),U=function(){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(M(),{children:[(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/assets/favicon.png"}),(0,o.jsx)("meta",{name:"theme-color",content:"#58b745"})]}),(0,o.jsx)(_.PB,{title:"Noonies 2020 Tech Awards by HackerNoon",description:"The Noonies are the annual tech awards by HackerNoon. Voted by the community, we reward the brightest minds in software, crypto and the future of the internet.",openGraph:{title:"Noonies 2020 Tech Awards by HackerNoon",description:"The Noonies are the annual tech awards by HackerNoon. Voted by the community, we reward the brightest minds in software, crypto and the future of the internet.",images:[{url:"".concat(R._O,"/assets/social-card.jpg")}],site_name:"Noonies 2020 Tech Awards by HackerNoon"}})]})},O=function(e){var t=(0,l.useState)({awards:0,nominees:0,votes:0}),r=t[0],h=t[1],g=(0,a.Z)((0,c.Kx)(x.Z.firestore().collection("noonies-awards").where("year","==",2020),{snapshotListenOptions:{includeMetadataChanges:!0}}),2),p=g[0],f=g[1],w=(0,a.Z)((0,c.d4)(x.Z.firestore().collection("noonies-categories").where("years","array-contains",2020),{snapshotListenOptions:{includeMetadataChanges:!0}}),2),A=w[0],j=w[1],y=(0,a.Z)((0,c.Xi)(x.Z.firestore().doc("noonies-misc/".concat(String(2020)))),2),N=y[0],k=y[1],Z=(0,l.useState)([]),E=Z[0],S=Z[1];return(0,l.useEffect)((function(){if(!f&&!j){var e,t=null!==(e=null===p||void 0===p?void 0:p.docs.map((function(e){return e.data()})))&&void 0!==e?e:[],a=t.reduce((function(e,t){var r;return e+(null===(r=t.nominees)||void 0===r?void 0:r.length)||0}),0);h((0,s.Z)((0,n.Z)({},r),{awards:t.length,nominees:a}));var o=A.map((function(e){var r=t.filter((function(t){return t.category===e.slug})),n=r.filter((function(e){return e.featured})),s=r.filter((function(e){return!e.featured})),a=(0,i.Z)(n).concat((0,i.Z)(s));return{title:e.title,slug:e.slug,description:e.description,awards:a.slice(0,4)}}));S(o)}}),[f,j,p,A]),(0,l.useEffect)((function(){k||h((0,s.Z)((0,n.Z)({},r),{votes:null===N||void 0===N?void 0:N.voteCount}))}),[N,k]),(0,o.jsxs)(d.Z,{children:[(0,o.jsx)(U,{}),(0,o.jsx)(b,{count:r,isVotingOpen:null===N||void 0===N?void 0:N.allowVoting}),!j&&(0,o.jsx)(u.Z,{isHome:!0,categories:A}),(0,o.jsx)(T,{isHome:!0}),(0,o.jsx)(m.Z,{children:(0,o.jsx)("div",{className:"my-12",children:f||j?(0,o.jsx)(B.Z,{}):E.length>0&&E.map((function(e,t){return(0,o.jsx)(v.Z,(0,n.Z)({isHome:!0},e),t)}))})})]})}},9815:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(943);var s=r(3375);var a=r(1566);function i(e){return function(e){if(Array.isArray(e))return(0,n.Z)(e)}(e)||(0,s.Z)(e)||(0,a.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}}},function(e){e.O(0,[662,436,962,133,464,306,774,888,179],(function(){return t=3328,e(e.s=t);var t}));var t=e.O();_N_E=t}]);