Skip to content

Commit

Permalink
fix(yarn.lock): Fix my broken yarn.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Mar 19, 2020
1 parent 34c5c6d commit fb6dcce
Show file tree
Hide file tree
Showing 2 changed files with 2,749 additions and 3,011 deletions.
61 changes: 61 additions & 0 deletions lib/components/form/connected-settings-selector-panel.js
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)
Loading

0 comments on commit fb6dcce

Please sign in to comment.