import React, { Component } from 'react' import './Layout.css' import './reset.css' import { Route, Router, Switch, Redirect } from 'react-router-dom' import Home from 'Components/pages/Home' import RulePage from 'Components/RulePage' import Route404 from 'Components/Route404' import Contact from 'Components/Contact' import Simulateur from 'Components/Simulateur' import RulesList from 'Components/pages/RulesList' import Mecanisms from 'Components/Mecanisms' import Contribution from 'Components/pages/Contribution' import Integration from 'Components/pages/Integration' import About from 'Components/pages/About' import ReactPiwik from 'Components/Tracker' import createHistory from 'history/createBrowserHistory' import { Header, Footer } from 'Components/pages/Header' import { getIframeOption } from '../utils' const piwik = new ReactPiwik({ url: 'stats.data.gouv.fr', siteId: 39, trackErrors: true }) let integratorUrl = getIframeOption('integratorUrl') ReactPiwik.push([ 'setCustomVariable', 1, 'urlPartenaire', decodeURIComponent(integratorUrl || 'https://embauche.beta.gouv.fr'), 'visit' ]) export default class Layout extends Component { history = createHistory() render() { // track the initial pageview ReactPiwik.push(['trackPageView']) return ( <>
{/* Redirect to be removed in March (Google should have understood...)*/} ( )} />