import { reduxWrapper } from '../store' import numeral from 'numeral'; import Script from 'next/script'; import '../css/style.css'; const m = Math.random(); numeral.register('locale', `locale_${ m }`, { delimiters: { thousands: ' ', decimal: ',' }, abbreviations: { thousand: 'k', million: 'm', billion: 'b', trillion: 't' }, currency: { symbol: '₽' } }); numeral.locale(`locale_${ m }`); const WrappedApp = (props) => { const { Component, pageProps, } = props; return ( <> { props.observer && ( <> ) } ) } WrappedApp.getInitialProps = async (props) => { const { req } = props.ctx; let observer = true; if(req !== undefined && req.url !== null && req.url.indexOf("offstage") > -1) { observer = false; } if(req !== undefined && req.cookies !== undefined && req.cookies.observer !== undefined && req.cookies.observer === "true") { observer = false; } return { observer, } } export default reduxWrapper.withRedux(WrappedApp);