2019-01-06 01:16:29 +00:00
|
|
|
import React from 'react';
|
2019-01-18 21:24:10 +00:00
|
|
|
import Modal from 'react-modal';
|
2019-01-04 02:33:13 +00:00
|
|
|
import * as Sentry from '@sentry/browser';
|
2019-01-06 17:08:37 +00:00
|
|
|
import { I18nextProvider } from 'react-i18next';
|
2019-01-04 02:33:13 +00:00
|
|
|
|
2019-01-06 17:08:37 +00:00
|
|
|
import i18n from 'i18n';
|
2019-01-06 01:16:29 +00:00
|
|
|
import Layout from 'components/Layout';
|
|
|
|
|
2019-01-04 02:33:13 +00:00
|
|
|
import 'site.css';
|
2019-01-19 18:26:13 +00:00
|
|
|
import style from 'globals.module.css';
|
2019-01-04 02:33:13 +00:00
|
|
|
|
2019-01-18 21:24:10 +00:00
|
|
|
Modal.setAppElement('#___gatsby');
|
|
|
|
|
2019-01-19 18:26:13 +00:00
|
|
|
Modal.defaultProps = {
|
|
|
|
...Modal.defaultProps,
|
|
|
|
className: style.modal,
|
|
|
|
overlayClassName: style.modalOverlay
|
2019-01-18 21:24:10 +00:00
|
|
|
};
|
|
|
|
|
2019-01-04 02:33:13 +00:00
|
|
|
export const onClientEntry = () => {
|
|
|
|
Sentry.getCurrentHub().getClient().getOptions().enabled =
|
|
|
|
(navigator.doNotTrack !== '1' && window.doNotTrack !== '1');
|
|
|
|
};
|
2019-01-06 01:16:29 +00:00
|
|
|
|
|
|
|
// eslint-disable-next-line react/prop-types
|
|
|
|
export const wrapPageElement = ({ element }) => {
|
|
|
|
return <Layout>{ element }</Layout>;
|
|
|
|
};
|
2019-01-06 17:08:37 +00:00
|
|
|
|
|
|
|
// eslint-disable-next-line react/prop-types
|
|
|
|
export const wrapRootElement = ({ element }) => {
|
|
|
|
return <I18nextProvider i18n={ i18n }>{ element }</I18nextProvider>;
|
|
|
|
};
|