Upgraded to the newest version of react-intl

This commit is contained in:
Przemek Wiech
2021-04-02 00:40:57 +02:00
parent 44e1954dda
commit df5ae76180
13 changed files with 653 additions and 778 deletions

View File

@@ -1,11 +1,11 @@
import {InjectedIntl} from 'react-intl';
import {IntlShape} from 'react-intl';
import {TopolaError} from './error';
/**
* Returns a translated message for the given error. If the message can't be
* translated, the original error.message is returned.
*/
export function getI18nMessage(error: Error, intl: InjectedIntl): string {
export function getI18nMessage(error: Error, intl: IntlShape): string {
if (!(error instanceof TopolaError)) {
return error.message;
}