Hello
This commit is contained in:
parent
9c48ae47ca
commit
0b0db31166
|
@ -1,4 +1,4 @@
|
||||||
import React, { Component } from 'react';
|
import React, { Component, useContext } from 'react';
|
||||||
import require$$1 from 'prop-types';
|
import require$$1 from 'prop-types';
|
||||||
import reactDom from 'react-dom';
|
import reactDom from 'react-dom';
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2808,7 +2808,7 @@ var Form = function (_Component) {
|
||||||
key: 'handleError',
|
key: 'handleError',
|
||||||
value: function handleError(props) {
|
value: function handleError(props) {
|
||||||
if (props.data && props.data.error && props.toast && this.displayError == true) {
|
if (props.data && props.data.error && props.toast && this.displayError == true) {
|
||||||
var contextValue = useContext(FormTranslationContext);
|
var contextValue = React.useContext(FormTranslationContext);
|
||||||
lib_8.error(contextValue.renderText(props.data.error));
|
lib_8.error(contextValue.renderText(props.data.error));
|
||||||
this.displayError = false;
|
this.displayError = false;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
||||||
import React, {Component} from 'react';
|
import React, {Component, useContext} from 'react';
|
||||||
import FormContext from './FormContext';
|
import FormContext from './FormContext';
|
||||||
import {toast, ToastContainer} from 'react-toastify';
|
import {toast, ToastContainer} from 'react-toastify';
|
||||||
import FormTranslationContext, {FormTranslationConsumer} from './FormTranslationContext'
|
import FormTranslationContext, {FormTranslationConsumer} from './FormTranslationContext'
|
||||||
|
|
Loading…
Reference in New Issue