{"ast":null,"code":"import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport axios from 'axios';\nimport React from 'react';\nimport Head from 'next/head';\nimport BuildHeader from '../../components/header.js';\nimport SchedBuilder from '../../components/schedbuilder.js';\nexport default function SchedulePage(schedData) {\n  //console.log(schedData.schedData.schedTable)\n  var schedTableData = schedData.schedData.schedTable;\n  var schedHeader = schedData.schedData.headerData;\n  return /*#__PURE__*/_jsxs(\"div\", {\n    children: [/*#__PURE__*/_jsx(Head, {\n      children: /*#__PURE__*/_jsx(\"title\", {\n        children: \"Goallinestats - \" + schedHeader['header'] + \" Schedule\"\n      })\n    }), /*#__PURE__*/_jsx(BuildHeader, {\n      headerData: schedHeader\n    }), /*#__PURE__*/_jsxs(\"div\", {\n      className: \"container mx-auto mb-2\",\n      children: [/*#__PURE__*/_jsx(\"h2\", {\n        className: \"p-2 text-2xl\",\n        children: \"Do not use this schedule to determine where your next game is! Information regarding arena closures and rescheduled games should be coming from official AHA channels!\"\n      }), /*#__PURE__*/_jsxs(\"p\", {\n        className: \"p-2 text-xl\",\n        children: [\"All dates and times are unofficial and subject to change! Please refer to the \", /*#__PURE__*/_jsx(\"a\", {\n          href: \"https://www.ahahockey.com/schedule/twin-cities\"\n        }), \" for the most up-to-date information!\"]\n      })]\n    }), /*#__PURE__*/_jsx(\"div\", {\n      className: \"container mx-auto\",\n      children: /*#__PURE__*/_jsx(SchedBuilder, {\n        baseURL: schedTableData.baseURL,\n        tableid: \"ScheduleData\",\n        dataTable: schedTableData,\n        type: schedTableData.type,\n        priority: \"Level\"\n      })\n    })]\n  });\n}\nexport async function getServerSideProps(context) {\n  const urlData = context.resolvedUrl.split('?')[1];\n  var schedFetch = await axios.get('/AHAapi/scheduleJSON.php?type=Grid&' + urlData);\n  var schedTable = schedFetch.data;\n  schedTable['baseURL'] = \"/AHAapi/scheduleJSON.php?\" + urlData; //console.log(urlData)\n\n  const index = await axios.get('/AHAapi/headerJSON.php?' + urlData);\n  const indexData = index.data;\n  schedTable['type'] = \"Grid\"; //console.log(schedTable.dataarray.length)\n\n  var schedData = {\n    headerData: indexData,\n    schedTable: schedTable\n  };\n  return {\n    props: {\n      schedData\n    }\n  };\n}","map":null,"metadata":{},"sourceType":"module"}