Moved propTypes and defaultProps as static properties in class components

This commit is contained in:
Alejandro Celaya
2018-08-27 16:53:09 +02:00
parent 47e6e1ca1f
commit 0b089e24de
18 changed files with 168 additions and 209 deletions

View File

@@ -9,13 +9,13 @@ import { createShortUrlResultType } from '../reducers/shortUrlCreationResult';
import { stateFlagTimeout } from '../../utils/utils';
import './CreateShortUrlResult.scss';
const propTypes = {
resetCreateShortUrl: PropTypes.func,
error: PropTypes.bool,
result: createShortUrlResultType,
};
export default class CreateShortUrlResult extends React.Component {
static propTypes = {
resetCreateShortUrl: PropTypes.func,
error: PropTypes.bool,
result: createShortUrlResultType,
};
state = { showCopyTooltip: false };
componentDidMount() {
@@ -62,5 +62,3 @@ export default class CreateShortUrlResult extends React.Component {
);
}
}
CreateShortUrlResult.propTypes = propTypes;