42 lines
1.7 KiB
JavaScript
42 lines
1.7 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
var _async_to_generator = require("@swc/helpers/lib/_async_to_generator.js").default;
|
|
var _interop_require_default = require("@swc/helpers/lib/_interop_require_default.js").default;
|
|
var _react = _interop_require_default(require("react"));
|
|
var _utils = require("../shared/lib/utils");
|
|
function appGetInitialProps(_) {
|
|
return _appGetInitialProps.apply(this, arguments);
|
|
}
|
|
function _appGetInitialProps() {
|
|
_appGetInitialProps = /**
|
|
* `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.
|
|
* This allows for keeping state between navigation, custom error handling, injecting additional data.
|
|
*/ _async_to_generator(function*({ Component , ctx }) {
|
|
const pageProps = yield (0, _utils).loadGetInitialProps(Component, ctx);
|
|
return {
|
|
pageProps
|
|
};
|
|
});
|
|
return _appGetInitialProps.apply(this, arguments);
|
|
}
|
|
var _Component;
|
|
class App extends (_Component = _react.default.Component) {
|
|
render() {
|
|
const { Component , pageProps } = this.props;
|
|
return /*#__PURE__*/ _react.default.createElement(Component, Object.assign({}, pageProps));
|
|
}
|
|
}
|
|
App.origGetInitialProps = appGetInitialProps;
|
|
App.getInitialProps = appGetInitialProps;
|
|
exports.default = App;
|
|
|
|
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
|
Object.defineProperty(exports.default, '__esModule', { value: true });
|
|
Object.assign(exports.default, exports);
|
|
module.exports = exports.default;
|
|
}
|
|
|
|
//# sourceMappingURL=_app.js.map
|