(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[973],{6876:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/2020/[category]",function(){return n(4988)}])},1790:function(e,t,n){"use strict";var r=n(5893),i=n(7294),a=n(3447),o=n(8390),s=n(3253),c=n.n(s),l=n(6261),d=n(6731);function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}t.Z=function(e){var t=e.isHome,n=e.categories,s=(0,i.useState)(!1),g=s[0],h=s[1];return(0,r.jsxs)("div",{className:"flex sticky p-1 pt-0 top-[4rem] z-20 sm:hidden bg-trasparent ",children:[(0,r.jsxs)(a.v,{as:"div",className:"bg-white dark:bg-green-800 w-[75%]",children:[(0,r.jsx)("div",{className:"",children:(0,r.jsxs)(a.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,r.jsx)("i",{className:"far fa-caret-down -mr-1 ml-2 w-5"})]})}),(0,r.jsx)(o.u,{as:i.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,r.jsx)(a.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,r.jsx)("div",{className:"py-1",children:null===n||void 0===n?void 0:n.map((function(e){return(0,r.jsx)(a.v.Item,{children:t?function(t){var n=t.active;return(0,r.jsx)(l.rU,{to:e.slug,smooth:!0,duration:200,offset:-150,className:u(n?"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 n=t.active;return(0,r.jsx)("a",{href:"/category/".concat(e.slug),className:u(n?"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,r.jsx)("div",{className:" w-[30%] text-center ",children:(0,r.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 h(!0)},children:[(0,r.jsx)("i",{className:"far fa-search mr-2"}),"Search..."]})}),(0,r.jsx)(c(),{isOpen:g,onRequestClose:function(){return h(!1)},children:(0,r.jsx)(d.Z,{})})]})}},4988:function(e,t,n){"use strict";n.r(t);var r=n(828),i=n(5893),a=(n(7294),n(1163)),o=n(6677),s=n(2962),c=n(6690),l=n(2857),d=n(1042),u=n(8200),g=n(6685),h=n(1172),p=n(1790);t.default=function(e){var t=(0,a.useRouter)().query.category;console.log(t);var n,x=(0,r.Z)((0,o.d4)(d.Z.firestore().collection("noonies-categories").where("years","array-contains",2020),{snapshotListenOptions:{includeMetadataChanges:!0}}),2),f=x[0],m=(x[1],(0,r.Z)((0,o.Xi)(d.Z.firestore().doc("noonies-categories/".concat(t)),{snapshotListenOptions:{includeMetadataChanges:!0}}),3)),v=m[0],w=m[1],b=(m[2],(0,r.Z)((0,o.d4)(d.Z.firestore().collection("noonies-awards").where("category","==",null!==t&&void 0!==t?t:""),{snapshotListenOptions:{includeMetadataChanges:!0}}),3)),j=b[0],y=b[1];b[2];return y||(n=j.filter((function(e){return 2020===e.year}))),(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(s.PB,{title:null===v||void 0===v?void 0:v.title,description:"Public nominations are now open for HackerNoon\u2019s third annual Noonies!",openGraph:{title:null===v||void 0===v?void 0:v.title,description:"Public nominations are now open for HackerNoon\u2019s third annual Noonies!",images:[{url:"https://noonies.hackernoon.com/assets/social-card.jpg"}],site_name:"Noonies 2020 Tech Awards by HackerNoon"}}),(0,i.jsx)(u.Z,{categories:f}),(0,i.jsx)(p.Z,{}),(0,i.jsx)(l.Z,{children:w||y?(0,i.jsx)(g.Z,{}):(0,i.jsx)(h.Z,{title:null===v||void 0===v?void 0:v.title,slug:null===v||void 0===v?void 0:v.slug,description:null===v||void 0===v?void 0:v.description,awards:n})})]})}}},function(e){e.O(0,[662,436,962,133,464,306,774,888,179],(function(){return t=6876,e(e.s=t);var t}));var t=e.O();_N_E=t}]);