Sorting & showing date
This commit is contained in:
@@ -246,6 +246,15 @@ const mapIdle = ({type, action}, component) => {
|
||||
})
|
||||
}
|
||||
|
||||
const sortChange = ({type, action}, component) => {
|
||||
component.setState({
|
||||
sort: action.sort,
|
||||
page: 0
|
||||
}, () => {
|
||||
component.refreshListings();
|
||||
});
|
||||
}
|
||||
|
||||
const handlers = {
|
||||
SET_MIN_PRICE: setMinPrice,
|
||||
SET_MAX_PRICE: setMaxPrice,
|
||||
@@ -265,7 +274,8 @@ const handlers = {
|
||||
BACK_TO_RESULTS: backToResults,
|
||||
LOAD_MORE_LISTINGS: loadMoreListings,
|
||||
MAP_IDLE: mapIdle,
|
||||
PINS_LOADED: pinsLoaded
|
||||
PINS_LOADED: pinsLoaded,
|
||||
SORT_CHANGE: sortChange
|
||||
};
|
||||
|
||||
export const handleMessage = ({ type, action }, component) => {
|
||||
|
||||
Reference in New Issue
Block a user