36049.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. exports.id = 36049;
  2. exports.ids = [36049];
  3. exports.modules = {
  4. /***/ 36049:
  5. /***/ ((module, __webpack_exports__, __webpack_require__) => {
  6. "use strict";
  7. __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
  8. __webpack_require__.r(__webpack_exports__);
  9. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10. /* harmony export */ "default": () => (/* binding */ pageWrapperTemplate),
  11. /* harmony export */ "getServerSideProps": () => (/* binding */ getServerSideProps),
  12. /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps)
  13. /* harmony export */ });
  14. /* harmony import */ var _sentry_server_config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96270);
  15. /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58097);
  16. /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__);
  17. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20997);
  18. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
  19. /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59003);
  20. /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
  21. /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71853);
  22. /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_4__);
  23. /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(60866);
  24. /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5__);
  25. /* harmony import */ var _error_module_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(88229);
  26. /* harmony import */ var _error_module_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_error_module_scss__WEBPACK_IMPORTED_MODULE_8__);
  27. /* harmony import */ var _dls_Button_Button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50497);
  28. /* harmony import */ var _dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61239);
  29. var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_dls_Button_Button__WEBPACK_IMPORTED_MODULE_6__]);
  30. _dls_Button_Button__WEBPACK_IMPORTED_MODULE_6__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
  31. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  32. const Error = ({ statusCode , hasFullWidth =true })=>{
  33. const { t } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5___default()("error");
  34. const router = (0,next_router__WEBPACK_IMPORTED_MODULE_4__.useRouter)();
  35. // if previous page url exist, go back, otherwise go to home
  36. const onBackButtonClicked = ()=>{
  37. if (document && document.referrer) {
  38. router.back();
  39. return;
  40. }
  41. router.push("/"); // go to home
  42. };
  43. return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
  44. className: classnames__WEBPACK_IMPORTED_MODULE_3___default()((_error_module_scss__WEBPACK_IMPORTED_MODULE_8___default().container), {
  45. [(_error_module_scss__WEBPACK_IMPORTED_MODULE_8___default().withFullWidth)]: hasFullWidth
  46. }),
  47. children: [
  48. /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h1", {
  49. className: (_error_module_scss__WEBPACK_IMPORTED_MODULE_8___default().title),
  50. children: t("title")
  51. }),
  52. /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
  53. className: (_error_module_scss__WEBPACK_IMPORTED_MODULE_8___default().goBack),
  54. children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_dls_Button_Button__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP, {
  55. onClick: onBackButtonClicked,
  56. children: t("go-back")
  57. })
  58. }),
  59. /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("p", {
  60. className: (_error_module_scss__WEBPACK_IMPORTED_MODULE_8___default().reportBug),
  61. children: [
  62. t("if-persist"),
  63. " ",
  64. /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
  65. href: "https://feedback.quran.com/",
  66. variant: _dls_Link_Link__WEBPACK_IMPORTED_MODULE_7__/* .LinkVariant.Highlight */ .r.Highlight,
  67. children: t("report-cta")
  68. })
  69. ]
  70. })
  71. ]
  72. });
  73. };
  74. var serverComponentModule = /*#__PURE__*/Object.freeze({
  75. __proto__: null,
  76. 'default': Error
  77. });
  78. /*
  79. * This file is a template for the code which will be substituted when our webpack loader handles non-API files in the
  80. * `pages/` directory.
  81. *
  82. * We use `__SENTRY_WRAPPING_TARGET_FILE__.cjs` as a placeholder for the path to the file being wrapped. Because it's not a real package,
  83. * this causes both TS and ESLint to complain, hence the pragma comments below.
  84. */
  85. const userPageModule = serverComponentModule ;
  86. const pageComponent = userPageModule ? userPageModule.default : undefined;
  87. const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : undefined;
  88. const origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined;
  89. const origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined;
  90. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  91. const getInitialPropsWrappers = {
  92. '/_app': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapAppGetInitialPropsWithSentry,
  93. '/_document': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapDocumentGetInitialPropsWithSentry,
  94. '/_error': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapErrorGetInitialPropsWithSentry,
  95. };
  96. const getInitialPropsWrapper = getInitialPropsWrappers['/_error'] || _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetInitialPropsWithSentry;
  97. if (pageComponent && typeof origGetInitialProps === 'function') {
  98. pageComponent.getInitialProps = getInitialPropsWrapper(origGetInitialProps) ;
  99. }
  100. const getStaticProps =
  101. typeof origGetStaticProps === 'function'
  102. ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetStaticPropsWithSentry(origGetStaticProps, '/_error')
  103. : undefined;
  104. const getServerSideProps =
  105. typeof origGetServerSideProps === 'function'
  106. ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '/_error')
  107. : undefined;
  108. const pageWrapperTemplate = pageComponent ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapPageComponentWithSentry(pageComponent ) : pageComponent;
  109. __webpack_async_result__();
  110. } catch(e) { __webpack_async_result__(e); } });
  111. /***/ }),
  112. /***/ 88229:
  113. /***/ ((module) => {
  114. // Exports
  115. module.exports = {
  116. "container": "_error_container__vJFnH",
  117. "withFullWidth": "_error_withFullWidth__VEzYc",
  118. "title": "_error_title__oLWAK",
  119. "goBack": "_error_goBack__U4WNd",
  120. "reportBug": "_error_reportBug__tsKmR"
  121. };
  122. /***/ })
  123. };
  124. ;
  125. //# sourceMappingURL=36049.js.map