diff --git a/src/components/views/elements/AppWarning.js b/src/components/views/elements/AppWarning.tsx similarity index 60% rename from src/components/views/elements/AppWarning.js rename to src/components/views/elements/AppWarning.tsx index 517242dab5..bac486d4b8 100644 --- a/src/components/views/elements/AppWarning.js +++ b/src/components/views/elements/AppWarning.tsx @@ -1,24 +1,20 @@ -import React from 'react'; // eslint-disable-line no-unused-vars -import PropTypes from 'prop-types'; +import React from 'react'; -const AppWarning = (props) => { +interface IProps { + errorMsg?: string; +} + +const AppWarning: React.FC = (props) => { return (
- { props.errorMsg } + { props.errorMsg || "Error" }
); }; -AppWarning.propTypes = { - errorMsg: PropTypes.string, -}; -AppWarning.defaultProps = { - errorMsg: 'Error', -}; - export default AppWarning;