Progress on contact
This commit is contained in:
@@ -278,6 +278,18 @@ const updateRoute = ({type, action}, component) => {
|
||||
component.router.update(action)
|
||||
}
|
||||
|
||||
const openContact = ({type, action}, component) => {
|
||||
component.setState({
|
||||
contactFormOpen: true
|
||||
});
|
||||
}
|
||||
|
||||
const closeContact = ({type, action}, component) => {
|
||||
component.setState({
|
||||
contactFormOpen: false
|
||||
});
|
||||
}
|
||||
|
||||
const handlers = {
|
||||
SET_MIN_PRICE: setMinPrice,
|
||||
SET_MAX_PRICE: setMaxPrice,
|
||||
@@ -299,7 +311,9 @@ const handlers = {
|
||||
MAP_IDLE: mapIdle,
|
||||
PINS_LOADED: pinsLoaded,
|
||||
SORT_CHANGE: sortChange,
|
||||
UPDATE_ROUTE: updateRoute
|
||||
UPDATE_ROUTE: updateRoute,
|
||||
OPEN_CONTACT: openContact,
|
||||
CLOSE_CONTACT: closeContact
|
||||
}
|
||||
|
||||
export const handleMessage = ({type, action}, component) => {
|
||||
@@ -307,5 +321,6 @@ export const handleMessage = ({type, action}, component) => {
|
||||
throw new `Unhandled message: ${type}`()
|
||||
}
|
||||
|
||||
console.log(type);
|
||||
return handlers[type]({type, action}, component)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user