-
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.
fix(yarn.lock): Fix my broken yarn.lock
- Loading branch information
1 parent
34c5c6d
commit fb6dcce
Showing
2 changed files
with
2,749 additions
and
3,011 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React, { Component } from 'react' | ||
import PropTypes from 'prop-types' | ||
import { connect } from 'react-redux' | ||
|
||
import { setQueryParam } from '../../actions/form' | ||
import { getShowUserSettings } from '../../util/state' | ||
|
||
import { StyledSettingsSelectorPanel } from './styled' | ||
import UserTripSettings from './user-trip-settings' | ||
|
||
// TODO: Button title should be bold when button is selected. | ||
|
||
class ConnectedSettingsSelectorPanel extends Component { | ||
static propTypes = { | ||
icons: PropTypes.object | ||
} | ||
|
||
render () { | ||
const { | ||
config, | ||
icons, | ||
query, | ||
setQueryParam, | ||
showUserSettings | ||
} = this.props | ||
|
||
return ( | ||
<div className='settings-selector-panel'> | ||
<div className='modes-panel'> | ||
{showUserSettings && <UserTripSettings />} | ||
|
||
<StyledSettingsSelectorPanel | ||
className='settings-selector-panel' | ||
icons={icons} | ||
queryParams={query} | ||
supportedModes={config.modes} | ||
supportedCompanies={config.companies} | ||
onQueryParamChange={setQueryParam} | ||
/> | ||
</div> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
// connect to redux store | ||
|
||
const mapStateToProps = (state, ownProps) => { | ||
const { config, currentQuery } = state.otp | ||
return { | ||
query: currentQuery, | ||
config, | ||
showUserSettings: getShowUserSettings(state.otp) | ||
} | ||
} | ||
|
||
const mapDispatchToProps = { | ||
setQueryParam | ||
} | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(ConnectedSettingsSelectorPanel) |
Oops, something went wrong.