This commit is contained in:
Maxime Renou 2019-03-01 14:58:41 +01:00
parent 9c48ae47ca
commit 0b0db31166
5 changed files with 5 additions and 5 deletions

2
dist/index.es.js vendored
View File

@ -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

2
dist/index.js vendored
View File

@ -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;
} }

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -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'