{"version":3,"file":"static/chunks/pages/college-bookstores-7e26dcbbb0841843.js","mappings":"oKA8BA,UAAeA,EAAf,G,uBC7BKC,OAAOC,SAAWD,OAAOC,UAAY,IAAIC,KAAK,CAC7C,sBACA,WACE,OAAO,EAAQ,Y","sources":["webpack://_N_E/./src/pages/college-bookstores/index.js","webpack://_N_E/?e977"],"sourcesContent":["import http from \"api\";\n\nimport { BookstoresLanding } from \"modules/Bookstores\";\n\nexport const getStaticProps = async () => {\n const storesByStates = await http.getBookstoresCountByStates();\n\n const bookstoresCountByStates = storesByStates.reduce((acc, element) => {\n const { id: countryId, name: countryName } = element.state.country || {};\n const bookstoresCount = element.count;\n const stateName = element.state.name;\n const [firstChar] = stateName;\n\n if (!acc[countryId]) {\n acc[countryId] = { countryName };\n }\n\n Object.prototype.hasOwnProperty.call(acc[countryId], firstChar)\n ? (acc[countryId][firstChar] = [\n ...acc[countryId][firstChar],\n { stateName, bookstoresCount }\n ])\n : (acc[countryId][firstChar] = [{ stateName, bookstoresCount }]);\n\n return acc;\n }, {});\n\n return { props: { bookstoresCountByStates } };\n};\n\nexport default BookstoresLanding;\n","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/college-bookstores\",\n function () {\n return require(\"private-next-pages/college-bookstores/index.js\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/college-bookstores\"])\n });\n }\n "],"names":["BookstoresLanding","window","__NEXT_P","push"],"sourceRoot":""}