diff --git a/src/actions/contacts.js b/src/actions/contacts.js
index e3cb4be..4af413a 100644
--- a/src/actions/contacts.js
+++ b/src/actions/contacts.js
@@ -27,3 +27,11 @@ export const addNetworkListToContact = (networkListId, contactId) => {
}
}
}
+
+export const CURRENT_SORT_CONTACT = 'CURRENT_SORT_CONTACT'
+export const currentSortContact = (currentContact) => {
+ return {
+ type: CURRENT_SORT_CONTACT,
+ payload: currentContact
+ }
+}
diff --git a/src/components/sortContact/SortContactContainer.js b/src/components/sortContact/SortContactContainer.js
index 96b8208..6afc354 100644
--- a/src/components/sortContact/SortContactContainer.js
+++ b/src/components/sortContact/SortContactContainer.js
@@ -1,7 +1,7 @@
import React, { PureComponent, PropTypes } from 'react'
import { connect } from 'react-redux'
import { submit } from 'redux-form'
-import { updateContact } from '../../actions/contacts'
+import { updateContact, currentSortContact } from '../../actions/contacts'
import {formFieldsContactDetails as formFields} from '../../helpers/formData'
import Media from 'react-media'
import ZeroContacts from './ZeroContacts'
@@ -33,6 +33,10 @@ class SortContactContainer extends PureComponent {
contacts: PropTypes.array.isRequired,
addedContactIds: PropTypes.array.isRequired
}
+ componentWillMount() {
+ console.log('WILLMOUNT')
+ this.getOneContact()
+ }
componentDidMount () {
window.addEventListener('keydown', this.handleContainerKeyPress)
@@ -63,6 +67,7 @@ class SortContactContainer extends PureComponent {
return contacts.filter((contact, index) => {
return index === contactIndex
})
+
}
onSubmit (values, dispatch, props) {
@@ -124,16 +129,9 @@ class SortContactContainer extends PureComponent {
)
}
- // NOTE i need to create renderHintText function that i will pass to HintFooter which will show different mila hints if a user clicks on next contact.
-
- // renderHintText() {
- // const hints = ['Tip #1: Use keyboard shortcuts to sort contacts faster!', 'Tip #2: Use left and right arrow keys to sort next contact']
- //
- // }
-
render () {
const { curContactNumb, totalContacts, completedProgress, snackOpen } = this.state
- // if (this.props.contacts === []) return