diff --git a/src/Contacts/ContactEdit.tsx b/src/Contacts/ContactEdit.tsx index b892aeb..7d0edeb 100644 --- a/src/Contacts/ContactEdit.tsx +++ b/src/Contacts/ContactEdit.tsx @@ -120,8 +120,8 @@ interface PropsType { collections: CachedCollection[]; initialCollection?: string; item?: ContactType; - onSave: (contact: ContactType, journalUid: string, originalContact?: ContactType) => Promise; - onDelete: (contact: ContactType, journalUid: string) => void; + onSave: (contact: ContactType, collectionUid: string, originalContact?: ContactType) => Promise; + onDelete: (contact: ContactType, collectionUid: string) => void; onCancel: () => void; history: History; } @@ -143,11 +143,11 @@ class ContactEdit extends React.PureComponent { note: string; title: string; - journalUid: string; + collectionUid: string; showDeleteDialog: boolean; }; - constructor(props: any) { + constructor(props: PropsType) { super(props); this.state = { uid: "", @@ -165,7 +165,7 @@ class ContactEdit extends React.PureComponent { note: "", title: "", - journalUid: "", + collectionUid: "", showDeleteDialog: false, }; @@ -227,9 +227,9 @@ class ContactEdit extends React.PureComponent { } if (props.initialCollection) { - this.state.journalUid = props.initialCollection; + this.state.collectionUid = props.initialCollection; } else if (props.collections[0]) { - this.state.journalUid = props.collections[0].collection.uid; + this.state.collectionUid = props.collections[0].collection.uid; } this.onSubmit = this.onSubmit.bind(this); this.handleChange = this.handleChange.bind(this); @@ -360,7 +360,7 @@ class ContactEdit extends React.PureComponent { setProperty("note", this.state.note); - this.props.onSave(contact, this.state.journalUid, this.props.item) + this.props.onSave(contact, this.state.collectionUid, this.props.item) .then(() => { this.props.history.goBack(); }); @@ -398,8 +398,8 @@ class ContactEdit extends React.PureComponent { Saving to