From d3b414526909dac803ed5ba4e24bc091df466eca Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 24 Nov 2019 16:26:57 +0200 Subject: [PATCH] Use the new UNSAFE_componentWillReceiveProps function name We should redesign these, but until then, this should unbreak linting. --- src/components/ContactEdit.tsx | 2 +- src/components/EventEdit.tsx | 2 +- src/components/TaskEdit.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ContactEdit.tsx b/src/components/ContactEdit.tsx index f6a52d8..cff61ce 100644 --- a/src/components/ContactEdit.tsx +++ b/src/components/ContactEdit.tsx @@ -199,7 +199,7 @@ class ContactEdit extends React.PureComponent { this.onDeleteRequest = this.onDeleteRequest.bind(this); } - public componentWillReceiveProps(nextProps: any) { + public UNSAFE_componentWillReceiveProps(nextProps: any) { if ((this.props.collections !== nextProps.collections) || (this.props.initialCollection !== nextProps.initialCollection)) { if (nextProps.initialCollection) { diff --git a/src/components/EventEdit.tsx b/src/components/EventEdit.tsx index ab6d749..20fe45e 100644 --- a/src/components/EventEdit.tsx +++ b/src/components/EventEdit.tsx @@ -114,7 +114,7 @@ class EventEdit extends React.PureComponent { this.onDeleteRequest = this.onDeleteRequest.bind(this); } - public componentWillReceiveProps(nextProps: any) { + public UNSAFE_componentWillReceiveProps(nextProps: any) { if ((this.props.collections !== nextProps.collections) || (this.props.initialCollection !== nextProps.initialCollection)) { if (nextProps.initialCollection) { diff --git a/src/components/TaskEdit.tsx b/src/components/TaskEdit.tsx index af8f631..92fde0f 100644 --- a/src/components/TaskEdit.tsx +++ b/src/components/TaskEdit.tsx @@ -102,7 +102,7 @@ class TaskEdit extends React.PureComponent { this.onDeleteRequest = this.onDeleteRequest.bind(this); } - public componentWillReceiveProps(nextProps: any) { + public UNSAFE_componentWillReceiveProps(nextProps: any) { if ((this.props.collections !== nextProps.collections) || (this.props.initialCollection !== nextProps.initialCollection)) { if (nextProps.initialCollection) {