From a5447e6ee3960a63681d7255cc664d14fe67bf79 Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Wed, 14 Aug 2019 08:28:15 +0100 Subject: [PATCH] Use React.FunctionComponent when typing --- app/src/frontend/building-edit.tsx | 6 +++--- app/src/frontend/building-view.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/frontend/building-edit.tsx b/app/src/frontend/building-edit.tsx index e7cc9eb8..f062ff63 100644 --- a/app/src/frontend/building-edit.tsx +++ b/app/src/frontend/building-edit.tsx @@ -70,7 +70,7 @@ class EditForm extends Component { // TODO: add proper types for (const field of props.fields) { fieldsObj[field.slug] = props[field.slug]; } - + this.state = { error: this.props.error || undefined, like: this.props.like || undefined, @@ -591,7 +591,7 @@ class YearEstimator extends Component { // TODO: add proper types toggleCopyAttribute: PropTypes.func, copying: PropTypes.bool }; - + constructor(props) { super(props); this.state = { @@ -680,7 +680,7 @@ LikeButton.propTypes = { handleLike: PropTypes.func } -const Label: React.SFC = (props) => { // TODO: remove any +const Label: React.FunctionComponent = (props) => { // TODO: remove any return (