-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #261 from opentripplanner/dev
Bug fix/feature release
- Loading branch information
Showing
26 changed files
with
803 additions
and
622 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,46 @@ | ||
import React, { Component } from 'react' | ||
import React from 'react' | ||
|
||
import LinkButton from './link-button' | ||
import StackedPaneDisplay from './stacked-pane-display' | ||
|
||
/** | ||
* This component handles the existing account display. | ||
*/ | ||
class ExistingAccountDisplay extends Component { | ||
render () { | ||
const { onCancel, onComplete, panes } = this.props | ||
const paneSequence = [ | ||
{ | ||
pane: () => <p><LinkButton to='/savedtrips'>Edit my trips</LinkButton></p>, | ||
title: 'My trips' | ||
}, | ||
{ | ||
pane: panes.terms, | ||
props: { disableCheckTerms: true }, | ||
title: 'Terms' | ||
}, | ||
{ | ||
pane: panes.notifications, | ||
title: 'Notifications' | ||
}, | ||
{ | ||
pane: panes.locations, | ||
title: 'My locations' | ||
} | ||
] | ||
const ExistingAccountDisplay = props => { | ||
// The props include Formik props that provide access to the current user data | ||
// and to its own blur/change/submit event handlers that automate the state. | ||
// We forward the props to each pane so that their individual controls | ||
// can be wired to be managed by Formik. | ||
const { onCancel, panes } = props | ||
const paneSequence = [ | ||
{ | ||
pane: () => <p><LinkButton to='/savedtrips'>Edit my trips</LinkButton></p>, | ||
title: 'My trips' | ||
}, | ||
{ | ||
pane: panes.terms, | ||
props: { ...props, disableCheckTerms: true }, | ||
title: 'Terms' | ||
}, | ||
{ | ||
pane: panes.notifications, | ||
props, | ||
title: 'Notifications' | ||
}, | ||
{ | ||
pane: panes.locations, | ||
props, | ||
title: 'My locations' | ||
} | ||
] | ||
|
||
return ( | ||
<StackedPaneDisplay | ||
onCancel={onCancel} | ||
onComplete={onComplete} | ||
paneSequence={paneSequence} | ||
title='My Account' | ||
/> | ||
) | ||
} | ||
return ( | ||
<StackedPaneDisplay | ||
onCancel={onCancel} | ||
paneSequence={paneSequence} | ||
title='My Account' | ||
/> | ||
) | ||
} | ||
|
||
export default ExistingAccountDisplay |
Oops, something went wrong.