{"ast":null,"code":"import _Reflect$construct from \"@babel/runtime-corejs2/core-js/reflect/construct\";\nimport _regeneratorRuntime from \"@babel/runtime-corejs2/regenerator\";\nimport _asyncToGenerator from \"@babel/runtime-corejs2/helpers/asyncToGenerator\";\nimport _classCallCheck from \"@babel/runtime-corejs2/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime-corejs2/helpers/createClass\";\nimport _inherits from \"@babel/runtime-corejs2/helpers/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime-corejs2/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime-corejs2/helpers/getPrototypeOf\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(_Reflect$construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nimport * as React from \"react\";\nimport Link from \"next/link\";\n\nvar IndexPage = /*#__PURE__*/function (_React$Component) {\n  _inherits(IndexPage, _React$Component);\n\n  var _super = _createSuper(IndexPage);\n\n  function IndexPage() {\n    _classCallCheck(this, IndexPage);\n\n    return _super.apply(this, arguments);\n  }\n\n  _createClass(IndexPage, [{\n    key: \"render\",\n    value: function render() {\n      return /*#__PURE__*/React.createElement(React.Fragment, null, \"Redirecting to\", \" \", /*#__PURE__*/React.createElement(Link, {\n        href: \"/view\"\n      }, /*#__PURE__*/React.createElement(\"a\", null, \"/view\")));\n    }\n  }], [{\n    key: \"getInitialProps\",\n    value: function () {\n      var _getInitialProps = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ctx) {\n        return _regeneratorRuntime.wrap(function _callee$(_context) {\n          while (1) {\n            switch (_context.prev = _context.next) {\n              case 0:\n                if (ctx.res) {\n                  // Server side, do a redirect using the HTTP response object\n                  ctx.res.writeHead(302, {\n                    Location: \"/view/\"\n                  });\n                  ctx.res.end();\n                } else {\n                  // Client side redirect\n                  document.location.pathname = \"/view/\";\n                }\n\n                return _context.abrupt(\"return\", {});\n\n              case 2:\n              case \"end\":\n                return _context.stop();\n            }\n          }\n        }, _callee);\n      }));\n\n      function getInitialProps(_x) {\n        return _getInitialProps.apply(this, arguments);\n      }\n\n      return getInitialProps;\n    }()\n  }]);\n\n  return IndexPage;\n}(React.Component);\n\nexport default IndexPage;","map":null,"metadata":{},"sourceType":"module"}