mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
typed MapListDialog
This commit is contained in:
parent
9006bb375b
commit
cf6866240b
6 changed files with 124 additions and 66 deletions
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue