Use React.FunctionComponent when typing
This commit is contained in:
parent
2127521094
commit
a5447e6ee3
@ -680,7 +680,7 @@ LikeButton.propTypes = {
|
||||
handleLike: PropTypes.func
|
||||
}
|
||||
|
||||
const Label: React.SFC<any> = (props) => { // TODO: remove any
|
||||
const Label: React.FunctionComponent<any> = (props) => { // TODO: remove any
|
||||
return (
|
||||
<label htmlFor={props.slug}>
|
||||
{props.title}
|
||||
|
@ -205,7 +205,7 @@ class DataSection extends React.Component<any, any> { // TODO: add proper types
|
||||
}
|
||||
}
|
||||
|
||||
const DataEntry: React.SFC<any> = (props) => { // TODO: remove any
|
||||
const DataEntry: React.FunctionComponent<any> = (props) => { // TODO: remove any
|
||||
return (
|
||||
<Fragment>
|
||||
<dt>
|
||||
@ -241,7 +241,7 @@ DataEntry.propTypes = {
|
||||
value: PropTypes.any
|
||||
}
|
||||
|
||||
const LikeDataEntry: React.SFC<any> = (props) => { // TODO: remove any
|
||||
const LikeDataEntry: React.FunctionComponent<any> = (props) => { // TODO: remove any
|
||||
const data_string = JSON.stringify({like: true});
|
||||
return (
|
||||
<Fragment>
|
||||
@ -280,7 +280,7 @@ LikeDataEntry.propTypes = {
|
||||
user_building_like: PropTypes.bool
|
||||
}
|
||||
|
||||
const MultiDataEntry: React.SFC<any> = (props) => { // TODO: remove any
|
||||
const MultiDataEntry: React.FunctionComponent<any> = (props) => { // TODO: remove any
|
||||
let content;
|
||||
|
||||
if (props.value && props.value.length) {
|
||||
|
Loading…
Reference in New Issue
Block a user