Skip to content

Commit

Permalink
refactor: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com>
  • Loading branch information
landonreed and binh-dam-ibigroup committed May 7, 2021
1 parent ec0d4c1 commit 8bf1037
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/editor/components/EditorInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default class EditorInput extends React.Component<Props> {
}
}

_renderRouteTypeOptions = (field: GtfsSpecField): React.Node => {
_renderRouteTypeOptions = (field: GtfsSpecField): Array<React.Node> => {
const options = field.options || []
const toOption = ({value, text}) => (
<option key={value}>{text} ({value})</option>
Expand All @@ -128,11 +128,11 @@ export default class EditorInput extends React.Component<Props> {
const routeTypes = [
{
label: 'Standard',
options: options.slice(0, 9).map(toOption)
options: options.filter(opt => opt.value < 100).map(toOption)
},
{
label: 'Extended',
options: options.slice(10).map(toOption)
options: options.filter(opt => opt.value >= 100).map(toOption)
}
]
return routeTypes.map(({label, options}) => (
Expand Down

0 comments on commit 8bf1037

Please sign in to comment.