1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7375],{8993:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates/category/[category]",function(){return o(9876)}])},9876:function(e,t,o){"use strict";o.r(t),o.d(t,{__N_SSG:function(){return a}});var i=o(5893),n=o(9008),l=o.n(n),r=o(1163),u=o(7294),d=o(5141),v=o(2566),s=o(851),a=!0;t.default=function(e){var t,o,n=e.tags,a=e.categoryInfo,c=(0,r.useRouter)(),m=c.query,p=m.type,f=m.sort,g=m.category,y=16,j=(0,u.useState)(null===a||void 0===a?void 0:a.templates),b=j[0],N=j[1],w=(0,u.useState)(null===b||void 0===b?void 0:b.slice(0,y)),x=w[0],_=w[1],h=function(){var e,t,o=null===(t=null===a||void 0===a||null===(e=a.templates)||void 0===e?void 0:e.filter((function(e){var t,o=null===(t=Object.values(null===e||void 0===e?void 0:e.price))||void 0===t?void 0:t.find((function(e){return"free"===(null===e||void 0===e?void 0:e.name)}));return!(!(null===o||void 0===o?void 0:o.name)||!(Number(null===o||void 0===o?void 0:o.amount)<1||0==Number(null===o||void 0===o?void 0:o.amount)))})))||void 0===t?void 0:t.sort((function(e,t){return Number(null===t||void 0===t?void 0:t.id)-Number(null===e||void 0===e?void 0:e.id)}));N(o),_(null===o||void 0===o?void 0:o.slice(0,y))},T=function(){var e,t=null===a||void 0===a||null===(e=a.templates)||void 0===e?void 0:e.sort((function(e,t){return Number(null===t||void 0===t?void 0:t.id)-Number(null===e||void 0===e?void 0:e.id)}));_(null===t||void 0===t?void 0:t.slice(0,y)),N(t)},k=function(){var e,t=null===a||void 0===a||null===(e=a.templates)||void 0===e?void 0:e.sort((function(e,t){return Number(null===t||void 0===t?void 0:t.sales)-Number(null===e||void 0===e?void 0:e.sales)}));_(null===t||void 0===t?void 0:t.slice(0,y)),N(t)};(0,u.useEffect)((function(){p&&!f&&("free"===p&&h(),"all"===p&&T()),!p&&f&&("newest"===f&&T(),"best"===f&&k()),p&&f&&("newest"===f&&"all"===p&&T(),"newest"===f&&"free"===p&&h(),"best"===f&&"all"===p&&k(),"best"===f&&"free"===p&&function(){var e,t,o=null===(t=null===a||void 0===a||null===(e=a.templates)||void 0===e?void 0:e.filter((function(e){var t,o=null===(t=Object.values(null===e||void 0===e?void 0:e.price))||void 0===t?void 0:t.find((function(e){return"free"===(null===e||void 0===e?void 0:e.name)}));return!(!(null===o||void 0===o?void 0:o.name)||!(Number(null===o||void 0===o?void 0:o.amount)<1||0==Number(null===o||void 0===o?void 0:o.amount)))})))||void 0===t?void 0:t.sort((function(e,t){return Number(null===t||void 0===t?void 0:t.sales)-Number(null===e||void 0===e?void 0:e.sales)}));_(null===o||void 0===o?void 0:o.slice(0,y)),N(o)}()),p||f||T()}),[p,f,null===a||void 0===a?void 0:a.templates]),(0,u.useEffect)((function(){var e;(null===c||void 0===c||null===(e=c.query)||void 0===e?void 0:e.category)!==(null===a||void 0===a?void 0:a.slug)&&c.push("/404")}),[c,null===a||void 0===a?void 0:a.slug]);var E=(null===a||void 0===a?void 0:a.title)||(null===a||void 0===a||null===(t=a.name)||void 0===t?void 0:t.replace(/(^\w{1})|(\s+\w{1})/g,(function(e){return null===e||void 0===e?void 0:e.toUpperCase()}))),S="".concat(null===a||void 0===a||null===(o=a.description)||void 0===o?void 0:o.slice(0,136)," ..."),O="".concat(s.clientURL,"/templates/category/").concat(null===a||void 0===a?void 0:a.slug),q=null===a||void 0===a?void 0:a.image_url;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l(),{children:[(0,i.jsxs)("title",{children:[E," | GrayGrids"]}),(0,i.jsx)("meta",{name:"title",content:E}),(0,i.jsx)("meta",{name:"description",content:S}),(0,i.jsx)("meta",{property:"og:type",content:"website"}),(0,i.jsx)("meta",{property:"og:url",content:O}),(0,i.jsx)("meta",{property:"og:title",content:E}),(0,i.jsx)("meta",{property:"og:description",content:S}),(0,i.jsx)("meta",{property:"og:image",content:q}),(0,i.jsx)("link",{rel:"canonical",href:O}),(0,i.jsx)("meta",{property:"twitter:card",content:"summary_large_image"}),(0,i.jsx)("meta",{property:"twitter:url",content:O}),(0,i.jsx)("meta",{property:"twitter:title",content:E}),(0,i.jsx)("meta",{property:"twitter:description",content:S}),(0,i.jsx)("meta",{property:"twitter:image",content:q})]}),(0,i.jsx)("div",{className:"pt-16",children:(0,i.jsx)(v.Z,{user:null===e||void 0===e?void 0:e.user,userToken:null===e||void 0===e?void 0:e.userToken,TitleDesc:{title:E,description:S},itemToLoad:y,templates:b,showTemplates:x,tags:n,setShowTemplates:_,pathName:"/templates/category/[category]",queryValue:g?f?{sort:f,category:g}:g&&{category:g}:f&&{sort:f}})}),(0,i.jsx)(d.Z,{})]})}}},function(e){e.O(0,[3714,2835,1555,2566,9774,2888,179],(function(){return t=8993,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.