lbry-desktop/ui/util/toast-wrappers.js
2022-03-24 15:19:50 +08:00

18 lines
526 B
JavaScript

// @flow
import { doToast } from 'redux/actions/notifications';
export function doFailedSignatureToast(dispatch: Dispatch, channelName: string) {
dispatch(
doToast({
message: __('Unable to verify signature for %channel%.', { channel: 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
}