Nettoyage de deux erreurs JS anodines

pull/439/head
Mael 2019-01-21 18:33:23 +01:00
parent e0b105a41e
commit 6957ea6fe2
2 changed files with 34 additions and 28 deletions

View File

@ -1,4 +1,5 @@
import React, { Component } from 'react'
import { dissoc } from 'ramda'
const forEachParent = (node, fn) => {
if (!node) {
@ -73,7 +74,7 @@ export class ScrollToElement extends Component {
render() {
return (
<div
{...this.props}
{...dissoc('onlyIfNotVisible', this.props)}
style={{
...this.props.style,
...(!this.props.children ? { position: 'absolute' } : {})

View File

@ -79,35 +79,40 @@ let RouterSwitch = compose(
)(({ sitePaths }) => {
return (
<Switch>
<Route exact path="/" component={Landing} />
<div className="app-container">
{/* Passing location down to prevent update blocking */}
<Navigation location={location} />
<div className="app-content">
<ProgressHeader />
<div
className="ui__ container"
style={{ flexGrow: 1, flexShrink: 0 }}>
<Route path={sitePaths.entreprise.index} component={CompanyIndex} />
<Route
path={sitePaths.sécuritéSociale.index}
component={SocialSecurity}
/>
<Route
path={sitePaths.démarcheEmbauche.index}
component={HiringProcess}
/>
<Route
path={sitePaths.documentation.index + '/:name+'}
component={RulePage}
/>
{process.env.NODE_ENV !== 'production' && (
<Route exact path="/sitemap" component={Sitemap} />
)}
<>
<Route exact path="/" component={Landing} />
<div className="app-container">
{/* Passing location down to prevent update blocking */}
<Navigation location={location} />
<div className="app-content">
<ProgressHeader />
<div
className="ui__ container"
style={{ flexGrow: 1, flexShrink: 0 }}>
<Route
path={sitePaths.entreprise.index}
component={CompanyIndex}
/>
<Route
path={sitePaths.sécuritéSociale.index}
component={SocialSecurity}
/>
<Route
path={sitePaths.démarcheEmbauche.index}
component={HiringProcess}
/>
<Route
path={sitePaths.documentation.index + '/:name+'}
component={RulePage}
/>
{process.env.NODE_ENV !== 'production' && (
<Route exact path="/sitemap" component={Sitemap} />
)}
</div>
<Footer />
</div>
<Footer />
</div>
</div>
</>
</Switch>
)
})