typed MapListDialog

This commit is contained in:
muerwre 2019-02-21 11:34:35 +07:00
parent 9006bb375b
commit cf6866240b
6 changed files with 124 additions and 66 deletions

View file

@ -9,13 +9,15 @@ import { DIALOGS, IDialogs, TABS } from '$constants/dialogs';
import * as ActionCreators from '$redux/user/actions';
import { IStickers } from "$constants/stickers";
interface IRoute {
lat: number,
lng: number,
export interface IRouteListItem {
_id: string,
title: string,
distance: number,
is_public: boolean,
updated_at: string,
}
interface IRootReducer {
export interface IRootReducer {
ready: boolean,
user: IUser,
editing: boolean,
@ -56,15 +58,15 @@ interface IRootReducer {
routes: {
limit: 0,
loading: boolean,
list: Array<IRoute>,
list: Array<IRouteListItem>,
step: number,
shift: number,
filter: {
title: '',
title: string,
starred: boolean,
distance: [number, number],
author: '',
tab: '',
author: string,
tab: string,
min: number,
max: number,
}

View file

@ -476,7 +476,7 @@ function* searchGetRoutes() {
const { routes: { step, shift, filter: { title, distance, tab } } } = yield select(getState);
return yield call(getRouteList, {
const result = yield call(getRouteList, {
id,
token,
title,
@ -486,6 +486,10 @@ function* searchGetRoutes() {
author: tab === 'mine' ? id : '',
starred: tab === 'starred',
});
console.log('RESULT?', result);
return result;
}
function* searchSetSagaWorker() {