Skip to content

Commit

Permalink
Merge pull request codeforboston#951 from knod/visit
Browse files Browse the repository at this point in the history
Items 3, (4 gone), and 5 of codeforboston#945, clean/resolve some `VisitPage` stuff
  • Loading branch information
knod authored Nov 2, 2018
2 parents 1806bbf + f55da46 commit cd75db6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/containers/VisitPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class VisitPage extends Component {
// will disappear. In that case, we move the user back to the first step so that they
// can re-enter the data.
const firstStepURL = `${this.getPathPrefix()}/${STEPS[ 0 ].key}`;

this.props.history.replace(firstStepURL);
}

Expand Down Expand Up @@ -197,7 +196,6 @@ class VisitPage extends Component {
}

this.goToStep({ index: nextStepIndex });
this.scrollToTop();
};

previousStep = () => {
Expand All @@ -208,7 +206,6 @@ class VisitPage extends Component {
}

this.goToStep({ index: prevStepIndex });
this.scrollToTop();
};

goToStep = ({ key, index }) => {
Expand All @@ -217,6 +214,7 @@ class VisitPage extends Component {
}

this.props.history.push(`${this.getPathPrefix()}/${key}`);
this.scrollToTop();
};

getPathPrefix = () => {
Expand Down Expand Up @@ -338,7 +336,6 @@ class VisitPage extends Component {
<div
className="flex-item flex-column current-step-component">
<StepComponent
component={ step.form }
snippets={ snippets[ step.key ] }
updateClientValue={
step.time === 'current' ?
Expand Down

0 comments on commit cd75db6

Please sign in to comment.