diff --git a/source/components/utils/Scroll.js b/source/components/utils/Scroll.js index 98f9134f4..91cf7a209 100644 --- a/source/components/utils/Scroll.js +++ b/source/components/utils/Scroll.js @@ -35,7 +35,9 @@ export class ScrollToElement extends Component { return } this.ref.scrollIntoView({ - behavior: this.props.behavior + behavior: this.props.behavior, + block: 'nearest', + inline: 'nearest' }) } componentDidMount() { diff --git a/source/sites/mycompanyinfrance.fr/App.js b/source/sites/mycompanyinfrance.fr/App.js index 1b0469f7c..b0fac10d7 100644 --- a/source/sites/mycompanyinfrance.fr/App.js +++ b/source/sites/mycompanyinfrance.fr/App.js @@ -9,7 +9,7 @@ import { } from '../../storage/persistEverything' import './App.css' import Landing from './Landing' -import CreateMyCompany from './pages/Company' +import CompanyIndex from './pages/Company' import Footer from './pages/Footer/Footer' import StepsHeader from './pages/Header/StepsHeader' import HiringProcess from './pages/HiringProcess' @@ -35,7 +35,7 @@ class InFranceRoute extends Component { {/* Passing location down to prevent update blocking */}
- +
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/Home.js b/source/sites/mycompanyinfrance.fr/pages/Company/Home.js index 2677ea9eb..64977611f 100644 --- a/source/sites/mycompanyinfrance.fr/pages/Company/Home.js +++ b/source/sites/mycompanyinfrance.fr/pages/Company/Home.js @@ -1,19 +1,16 @@ /* @flow */ -import Scroll from 'Components/utils/Scroll' import React from 'react' import { connect } from 'react-redux' import { Link } from 'react-router-dom' import { nextQuestionUrlSelector } from 'Selectors/companyStatusSelectors' -import { isIE } from '../../../../utils' import LegalStatusChoices from './LegalStatusChoice' -import type { Match, RouterHistory } from 'react-router' +import type { Match } from 'react-router' type Props = { match: Match, - history: RouterHistory, nextQuestionUrl: string } -const CreateMyCompany = ({ match, nextQuestionUrl, history }: Props) => ( +const CreateMyCompany = ({ match, nextQuestionUrl }: Props) => ( <>

Create your company

@@ -37,8 +34,6 @@ const CreateMyCompany = ({ match, nextQuestionUrl, history }: Props) => ( )} - {!isIE() && - !match.isExact && } ) diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/MainStatus.js b/source/sites/mycompanyinfrance.fr/pages/Company/MainStatus.js index acfa9eac0..5a9bafdb4 100644 --- a/source/sites/mycompanyinfrance.fr/pages/Company/MainStatus.js +++ b/source/sites/mycompanyinfrance.fr/pages/Company/MainStatus.js @@ -143,7 +143,7 @@ const SetMainStatus = ({ history, possibleStatus }: Props) => {

- Do it later › + Choose later ›
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/index.js b/source/sites/mycompanyinfrance.fr/pages/Company/index.js index da0b2c6f4..f2b97538d 100644 --- a/source/sites/mycompanyinfrance.fr/pages/Company/index.js +++ b/source/sites/mycompanyinfrance.fr/pages/Company/index.js @@ -1,27 +1,28 @@ import React from 'react' -import { Route, Switch, Redirect } from 'react-router' -import { animated, Transition } from 'react-spring' +import { connect } from 'react-redux' +import { Redirect, Route, Switch } from 'react-router' import * as Animate from 'Ui/animate' +import { ScrollToElement } from '../../../../components/utils/Scroll' +import AfterRegistration from './AfterRegistration' +import CreationChecklist from './CreationChecklist' import DefineDirectorStatus from './DirectorStatus' import Find from './Find' import Home from './Home' import Liability from './Liability' import MainStatus from './MainStatus' -import { connect } from "react-redux"; -import MinorityDirector from './MinorityDirector' import Microenterprise from './Microenterprise' -import AfterRegistration from './AfterRegistration' +import MinorityDirector from './MinorityDirector' import NumberOfAssociate from './NumberOfAssociate' -import CreationChecklist from './CreationChecklist' - -const withRouteAnimation = style => AnimatedComponent => { - const withRouteAnimation = props => ( - - - +const withAnimation = Component => { + const AnimateRouteComponent = (...props) => ( + + + + + ) - return withRouteAnimation; + return AnimateRouteComponent } const CreateMyCompany = ({ match, location, companyStatusChoice }) => ( @@ -31,63 +32,51 @@ const CreateMyCompany = ({ match, location, companyStatusChoice }) => ( + /> - {companyStatusChoice && - - } - + {companyStatusChoice && ( + + )} + -
- - {style => ( - - - - - - - - - )} - -
+ + + + + + + + ) -export default connect(state => ({ companyStatusChoice: state.inFranceApp.companyStatusChoice}))(CreateMyCompany) +export default connect(state => ({ + companyStatusChoice: state.inFranceApp.companyStatusChoice +}))(CreateMyCompany)