mirror of
https://github.com/trezor/trezor-wallet
synced 2025-07-07 15:18:13 +00:00
17 lines
411 B
JavaScript
17 lines
411 B
JavaScript
/* @flow */
|
|
import * as React from 'react';
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
export const getBottomText = (error: any, warning: any, info: any): React.Node => {
|
|
if (error) {
|
|
return <FormattedMessage {...error} />;
|
|
}
|
|
if (warning) {
|
|
return <FormattedMessage {...warning} />;
|
|
}
|
|
if (info) {
|
|
return <FormattedMessage {...info} />;
|
|
}
|
|
return null;
|
|
};
|