Skip to content

Commit

Permalink
refactor(field-trip): change status icon prop name
Browse files Browse the repository at this point in the history
  • Loading branch information
landonreed committed Aug 5, 2021
1 parent a99744f commit e8722a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/components/admin/field-trip-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ class FieldTripRequestRecord extends Component {
</span>
<span style={{display: 'inline-block', width: '50%'}}>
<span style={{marginLeft: '10px'}}>
<FieldTripStatusIcon status={outboundTripStatus} /> Outbound
<FieldTripStatusIcon ok={Boolean(outboundTripStatus)} /> Outbound
</span>
<span style={{marginLeft: '10px'}}>
<FieldTripStatusIcon status={inboundTripStatus} /> Inbound
<FieldTripStatusIcon ok={Boolean(inboundTripStatus)} /> Inbound
</span>
</span>
<span style={{display: 'block', fontSize: '.9em'}}>
Expand Down
4 changes: 2 additions & 2 deletions lib/components/admin/field-trip-status-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react'

import Icon from '../narrative/icon'

const FieldTripStatusIcon = ({ status }) => (
status
const FieldTripStatusIcon = ({ ok }) => (
ok
? <Icon className='text-success' type='check' />
: <Icon className='text-warning' type='exclamation-circle' />
)
Expand Down
2 changes: 1 addition & 1 deletion lib/components/admin/trip-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class TripStatus extends Component {
return (
<Full>
<Header>
<FieldTripStatusIcon status={this._tripIsPlanned()} />
<FieldTripStatusIcon ok={this._tripIsPlanned()} />
{outbound ? 'Outbound' : 'Inbound'} trip
<Button bsSize='xs' onClick={this._onPlanTrip}>Plan</Button>
<Button
Expand Down

0 comments on commit e8722a5

Please sign in to comment.