Browse Source

show spinner

all-modes
pbca26 8 years ago
parent
commit
8e569142d5
  1. 12
      react/src/components/dashboard/notifications/notifications.render.js

12
react/src/components/dashboard/notifications/notifications.render.js

@ -88,19 +88,18 @@ export const NotificationsModalRender = function() {
}; };
export const NotificationsRender = function() { export const NotificationsRender = function() {
if (this.state.debug) {
return ( return (
<div> <div>
<div <div
className={ this.props.Dashboard.activeHandle && this.props.Dashboard.activeHandle.status === 'unlocked' ? 'notifications-badge stick-to-top' : 'notifications-badge' } className={ this.props.Dashboard.activeHandle && this.props.Dashboard.activeHandle.status === 'unlocked' ? 'notifications-badge stick-to-top' : 'notifications-badge' }
onClick={ this.toggleNotificationsModal }> onClick={ this.state.debug ? this.toggleNotificationsModal : null }>
<span className="badge success"> <span className={ this.state.debug ? 'badge success' : 'hide' }>
{ this.state.calls.success } { this.state.calls.success }
</span> </span>
<span className="badge error"> <span className={ this.state.debug ? 'badge error' : 'hide' }>
{ this.state.calls.error } { this.state.calls.error }
</span> </span>
<span className="badge pending"> <span className={ this.state.debug ? 'badge pending' : 'hide' }>
{ this.state.calls.pending } { this.state.calls.pending }
</span> </span>
<div className={ this.state.calls.pending === 0 ? 'spinner spinner-hide' : 'spinner' }> <div className={ this.state.calls.pending === 0 ? 'spinner spinner-hide' : 'spinner' }>
@ -114,7 +113,4 @@ export const NotificationsRender = function() {
{ this.renderNotificationsModal() } { this.renderNotificationsModal() }
</div> </div>
); );
} else {
return null;
}
}; };
Loading…
Cancel
Save