From 60b0e35b2c151922797bc0ce813c44f35a730129 Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Thu, 11 Oct 2018 14:50:34 +0200 Subject: [PATCH] Reviex fix - reducer to string --- src/actions/NotificationActions.js | 4 ++-- src/reducers/NotificationReducer.js | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/actions/NotificationActions.js b/src/actions/NotificationActions.js index 6f1181d1..3d0d68fb 100644 --- a/src/actions/NotificationActions.js +++ b/src/actions/NotificationActions.js @@ -11,8 +11,8 @@ export type NotificationAction = { type: typeof NOTIFICATION.ADD, payload: { +type: string, - +title: string, - +message?: React.Node | string, + +title: React.Node | string, + +message?: ?(React.Node | string), +cancelable: boolean, actions?: Array } diff --git a/src/reducers/NotificationReducer.js b/src/reducers/NotificationReducer.js index 720d6883..34274aea 100644 --- a/src/reducers/NotificationReducer.js +++ b/src/reducers/NotificationReducer.js @@ -1,6 +1,6 @@ /* @flow */ - +import * as React from 'react'; import { LOCATION_CHANGE } from 'react-router-redux'; import * as NOTIFICATION from 'actions/constants/notification'; import { DEVICE } from 'trezor-connect'; @@ -17,8 +17,8 @@ export type NotificationEntry = { +id: ?string; +devicePath: ?string; +type: string; - +title: string; - +message: string; + +title: React.Node | string; + +message: ?(React.Node | string); +cancelable: boolean; +actions: Array; } @@ -43,8 +43,8 @@ const addNotification = (state: State, payload: any): State => { id: payload.id, devicePath: payload.devicePath, type: payload.type, - title: payload.title.toString(), - message: payload.message.toString(), + title: payload.title, + message: payload.message, cancelable: payload.cancelable, actions: payload.actions, });