convert ble service to saga

This commit is contained in:
David Lechner
2020-06-11 22:53:38 -05:00
committed by David Lechner
parent f3425e2f0f
commit bda007c17a
20 changed files with 500 additions and 227 deletions
+4 -1
View File
@@ -3,6 +3,7 @@
import { IconName, Intent, Toast } from '@blueprintjs/core';
import { WithI18nProps, withI18n } from '@shopify/react-i18n';
import { PrimitiveReplacementDictionary } from '@shopify/react-i18n/dist/src/types';
import React from 'react';
import { connect } from 'react-redux';
import { Action, Dispatch } from '../actions';
@@ -20,6 +21,7 @@ interface OwnProps {
level: NotificationLevel;
message?: string;
messageId?: string;
replacements?: PrimitiveReplacementDictionary;
helpUrl?: string;
action?: MessageAction;
}
@@ -63,6 +65,7 @@ class Notification extends React.Component<NotificationProps> {
messageId,
onAction,
onClose,
replacements,
} = this.props;
return (
<Toast
@@ -74,7 +77,7 @@ class Notification extends React.Component<NotificationProps> {
<div>
<p>
{messageId
? i18n.translate(messageId)
? i18n.translate(messageId, replacements)
: message || 'missing message!'}
</p>
{helpUrl && (