lbry-desktop/ui/util/toast-wrappers.js

20 lines
517 B
JavaScript
Raw Normal View History

// @flow
import { doToast } from 'redux/actions/notifications';
export function doFailedSignatureToast(dispatch: Dispatch, channelName: string) {
dispatch(
doToast({
message: __('Unable to verify signature.'),
subMessage: channelName,
isError: true,
})
);
}
export function devToast(dispatch: Dispatch, msg: string) {
// @if process.env.NODE_ENV!='production'
console.error(msg); // eslint-disable-line
dispatch(doToast({ isError: true, message: `DEV: ${msg}` }));
// @endif
}