Skip to content

Commit

Permalink
eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
drcmda committed Jan 25, 2019
1 parent 2edc744 commit c707ff7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/components/Notifications/NotificationAlert.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export default class NotificationAlert extends React.PureComponent {
{ opened, previousNotifications }
) {
return {
opened: !notificationOpen && notifications !== previousNotifications ? false : opened,
opened:
!notificationOpen && notifications !== previousNotifications
? false
: opened,
previousNotifications: notifications,
}
}
Expand All @@ -20,7 +23,7 @@ export default class NotificationAlert extends React.PureComponent {
this.setState({ opened: true })
this.props.onClick()
}

render() {
const show = !this.state.opened && this.props.notifications > 0
return (
Expand Down
4 changes: 3 additions & 1 deletion src/components/Notifications/NotificationBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ export default class NotificationBar extends React.Component {
<Text>Activity</Text>
</h1>
{count ? (
<Badge.Notification style={{ background: theme.accent }}>{count}</Badge.Notification>
<Badge.Notification style={{ background: theme.accent }}>
{count}
</Badge.Notification>
) : null}
</div>
<a href="#" onClick={onClearAll}>
Expand Down
6 changes: 5 additions & 1 deletion src/components/Notifications/TimeTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export default class TimeTag extends React.Component {
}
render() {
const time = differenceInMinutes(new Date(), this.state.time)
return <span style={this.props.style} ref={this.viewRef}>{time}m ago</span>
return (
<span style={this.props.style} ref={this.viewRef}>
{time}m ago
</span>
)
}
}

0 comments on commit c707ff7

Please sign in to comment.