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-18 21:24:10 +00:00
|
|
|
Modal.setAppElement('#___gatsby');
|
|
|
|
|
|
|
|
Modal.defaultStyles.overlay = {
|
|
|
|
...Modal.defaultStyles.overlay,
|
|
|
|
backgroundColor: 'rgba(0, 0, 0, 0.25)'
|
|
|
|
};
|
|
|
|
Modal.defaultStyles.content = {
|
|
|
|
...Modal.defaultStyles.content,
|
|
|
|
background: 'transparent',
|
|
|
|
border: '0 solid',
|
|
|
|
borderRadius: '0',
|
|
|
|
overflow: null,
|
|
|
|
padding: '2rem',
|
|
|
|
top: '7rem',
|
|
|
|
bottom: '7rem',
|
|
|
|
left: '2rem',
|
|
|
|
right: '2rem'
|
|
|
|
};
|
|
|
|
|
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>;
|
|
|
|
};
|