Skip to content

Commit

Permalink
fix: Fix issues from PR lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Jan 28, 2020
1 parent 0fdd8e6 commit b7c0c50
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/manager/components/version/FeedVersionViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ export default class FeedVersionViewer extends Component<Props> {
}

type SelectorProps = {
comparedVersion: FeedVersion,
feedVersionIndex: number,
gtfsPlusValidation: GtfsPlusValidation,
version: FeedVersion,
comparedVersion: FeedVersion,
versionSection: ?string
}

Expand All @@ -150,26 +150,26 @@ class VersionSectionSelector extends Component<SelectorProps> {
const text = hasCriticalError
? 'critical error'
: validationSummary.errorCount
const diff = comparedVersion
const diff = comparedVersion
? validationSummary.errorCount - comparedVersion.validationSummary.errorCount
: 0
const diffColor = diff > 0 ? 'danger' : (diff < 0 ? 'success' : 'default')
const diffText = comparedVersion
const diffText = comparedVersion
? diff === 0 ? '=' : ((diff > 0 ? '+' : '') + numeral(diff).format('0a'))
: ''
return (
<span>
<Label bsStyle={color}>
<Label bsStyle={color} htmlFor>
{text}
</Label>
{comparedVersion
? <Label bsStyle={diffColor} style={{paddingLeft: '0.2em', paddingRight: '0.2em'}}>
{comparedVersion
? <Label bsStyle={diffColor} style={{paddingLeft: '0.2em', paddingRight: '0.2em'}} htmlFor>
{diffText}
</Label>
</Label>
: ''
}
</span>
)
)
}

_getGtfsPlusIssueCount = (gtfsPlusValidation: GtfsPlusValidation) => {
Expand All @@ -192,7 +192,7 @@ class VersionSectionSelector extends Component<SelectorProps> {
: <Icon type='check' />
return issueCount === null
? <span><Loading small inline /></span>
: <span><Label bsStyle={color}>{text}</Label></span>
: <span><Label bsStyle={color} htmlFor>{text}</Label></span>
}

render () {
Expand Down Expand Up @@ -227,7 +227,7 @@ class VersionSectionSelector extends Component<SelectorProps> {
active={this.props.versionSection === 'comments'}>
<ListGroupItem>
<Glyphicon glyph='comment' /> Version comments{' '}
<Label>{version.noteCount}</Label>
<Label htmlFor>{version.noteCount}</Label>
</ListGroupItem>
</LinkContainer>
</ListGroup>
Expand Down

0 comments on commit b7c0c50

Please sign in to comment.