Contact done

This commit is contained in:
Edin Dazdarevic
2017-04-13 17:23:46 +02:00
parent 6ef680a7d3
commit 233437e1c1
7 changed files with 198 additions and 50 deletions

View File

@@ -327,7 +327,21 @@ const invalidContact = ({type, action}, component) => {
})
}
const submitContact = ({type, action}, component) => {
const submitContactStart = ({type, action}, component) => {
component.setState({
contact: {
sending: true
}
})
}
const submitContactEnd = ({type, action}, component) => {
component.setState({
contactFormOpen: false,
contact: {
sending: false,
}
})
}
const handlers = {
@@ -355,7 +369,8 @@ const handlers = {
OPEN_CONTACT: openContact,
CLOSE_CONTACT: closeContact,
UPDATE_CONTACT_INFO: updateContactInfo,
SUBMIT_CONTACT: submitContact,
SUBMIT_CONTACT_START: submitContactStart,
SUBMIT_CONTACT_END: submitContactEnd,
INVALID_CONTACT: invalidContact
}