diff --git a/app/javascript/forms/provider-forms/cloud-provider-form/index.jsx b/app/javascript/forms/provider-forms/cloud-provider-form/index.jsx index 013c5cc61d1..4497f65c377 100644 --- a/app/javascript/forms/provider-forms/cloud-provider-form/index.jsx +++ b/app/javascript/forms/provider-forms/cloud-provider-form/index.jsx @@ -1,4 +1,5 @@ import React, { useState, useEffect } from 'react'; +import PropTypes from 'prop-types'; import { componentTypes, validatorTypes } from '@data-driven-forms/react-form-renderer'; import { API } from '../../../http_api'; @@ -55,7 +56,7 @@ const initialSchema = includeType => ([ }, ]); -const CloudProviderForm = ({ providerId, kind, redirect, ...props }) => { +const CloudProviderForm = ({ providerId, kind, redirect }) => { const [{ type, schema, values }, setState] = useState({ schema: { fields: [] } }); const loadProviderSchema = (type, newValues = {}) => { @@ -153,5 +154,17 @@ const CloudProviderForm = ({ providerId, kind, redirect, ...props }) => { ); }; +CloudProviderForm.propTypes = { + providerId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + kind: PropTypes.string, + redirect: PropTypes.string, +}; + +CloudProviderForm.defaultProps = { + providerId: undefined, + kind: undefined, + redirect: undefined, +}; + export const EditingContext = React.createContext({}); export default CloudProviderForm;