import React from 'react'; import { secondsToString } from '../../../util/time'; import { translate } from '../../../translate/translate'; export const NotificationsByTypeRender = function(logItem, type, index) { return (
{ index + 1 }.
Time: { secondsToString(logItem.timestamp, true, true) }
GUI Function: { logItem.function }
HTTP: { logItem.httpMethod.toUpperCase() }
URL: { logItem.url }
Payload: { JSON.stringify(logItem.payload, null, '\t') }
Response: { JSON.stringify(logItem.response, null, '\t') }

); } export const NotificationsModalRender = function() { return (
this.handleKeydown(event) }>
{ this.renderNotificationsByType('success') }
{ this.renderNotificationsByType('error') }
{ this.renderNotificationsByType('pending') }
); }; export const NotificationsRender = function() { return (
{ this.state.calls.success } { this.state.calls.error } { this.state.calls.pending }
{ this.renderNotificationsModal() }
); };