From 912f47f6ada4b172ea10c19b99a25f54379a6278 Mon Sep 17 00:00:00 2001 From: Tomasz Subik Date: Thu, 24 Oct 2024 10:50:42 +0200 Subject: [PATCH] use custom error page --- pages/_app.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pages/_app.js b/pages/_app.js index f4dfef07..6c34e1b7 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -1,7 +1,6 @@ import React from 'react'; import { Provider } from 'react-redux'; import App from 'next/app'; -import Error from 'next/error'; import Router from 'next/router'; import { createStore, combineReducers, applyMiddleware, compose } from 'redux'; import thunk from 'redux-thunk'; @@ -21,6 +20,8 @@ import { getOperators } from 'modules/operators'; import GoogleTagManager from 'components/layout/google-tag-manager'; import PageViewTracking from 'components/layout/pageview-tracking'; +import Error from 'pages/_error'; + import { getCookie, setCookie, deleteCookie } from 'services/cookies'; import { getSession } from 'services/session'; @@ -144,7 +145,7 @@ class MyApp extends App { return {}; } - return { pageProps, language, messages, defaultLocale }; + return { pageProps, language, messages, defaultLocale, url }; } componentDidMount() { @@ -162,10 +163,10 @@ class MyApp extends App { } render() { - const { Component, pageProps, store, defaultLocale, language, messages } = this.props; + const { Component, pageProps, store, defaultLocale, language, messages, url } = this.props; if (pageProps.errorCode) { - return ; + return ; } return (