diff --git a/src/components/dialogs/MapListDialog.jsx b/src/components/dialogs/MapListDialog.jsx deleted file mode 100644 index 25a9b64..0000000 --- a/src/components/dialogs/MapListDialog.jsx +++ /dev/null @@ -1,53 +0,0 @@ -// @flow -import React from 'react'; -// import { bindActionCreators } from 'redux'; -import { connect } from 'react-redux'; -import { RouteRow } from '$components/maps/RouteRow'; -import type { Route } from '$constants/types'; -import { Scroll } from '$components/Scroll'; - -type Props = { - routes: { [id: String]: Route }, - editing: Boolean, - routes_sorted: Array, -}; - -const Component = ({ routes, editing, routes_sorted }: Props) => ( -
-
-
- Ваши маршруты -
-
- { - routes_sorted.length > 0 - ? `${routes_sorted.length} шт.` - : '(здесь пока ничего нет)' - } -
-
- -
- { - routes_sorted.map(id => ( - - )) - } -
-
-
-); - -const mapStateToProps = ({ user: { editing, user: { routes } } }) => ({ - routes, - editing, - routes_sorted: Object.keys(routes).sort((a, b) => (Date.parse(routes[b].updated_at) - Date.parse(routes[a].updated_at))), -}); - -// const mapDispatchToProps = dispatch => bindActionCreators({}, dispatch); - -export const MapListDialog = connect(mapStateToProps)(Component); diff --git a/src/components/dialogs/MapListMoreDialog.jsx b/src/components/dialogs/MapListMoreDialog.jsx index 66ce734..0f99512 100644 --- a/src/components/dialogs/MapListMoreDialog.jsx +++ b/src/components/dialogs/MapListMoreDialog.jsx @@ -46,7 +46,7 @@ class Component extends React.Component { openRoute = _id => { pushPath(`/${_id}/${this.props.editing ? 'edit' : ''}`); - this.props.setDialogActive(false); + // this.props.setDialogActive(false); }; render() { @@ -70,26 +70,26 @@ class Component extends React.Component { return (
{ list.length === 0 && loading && -
-
- -
+
+
+
+
} { ready && !loading && list.length === 0 && -
-
- -
- ТУТ ПУСТО
- И ОДИНОКО +
+
+
+ ТУТ ПУСТО
+ И ОДИНОКО +
}
{ Object.keys(TABS).map(item => (
this.props.searchSetTab(item)} key={item} > @@ -150,7 +150,7 @@ class Component extends React.Component { } const mapStateToProps = ({ user: { editing, routes } }) => { - if (routes.filter.max >= 9999){ + if (routes.filter.max >= 9999) { return { routes, editing, marks: {}, ready: false, }; diff --git a/src/components/maps/RouteRow.jsx b/src/components/maps/RouteRow.jsx index ac1b76a..f1b56f8 100644 --- a/src/components/maps/RouteRow.jsx +++ b/src/components/maps/RouteRow.jsx @@ -1,7 +1,6 @@ // @flow import React from 'react'; import { Icon } from '$components/panels/Icon'; -import { pushPath } from '$utils/history'; type Props = { title: String, diff --git a/src/containers/LeftDialog.jsx b/src/containers/LeftDialog.jsx index 3e664f9..a41857a 100644 --- a/src/containers/LeftDialog.jsx +++ b/src/containers/LeftDialog.jsx @@ -1,7 +1,6 @@ // @flow import React from 'react'; import { DIALOGS } from '$constants/dialogs'; -import { MapListDialog } from '$components/dialogs/MapListDialog'; import classnames from 'classnames'; import { AppInfoDialog } from '$components/dialogs/AppInfoDialog'; import { Icon } from '$components/panels/Icon'; diff --git a/src/index.js b/src/index.js index 09c9257..1eebe30 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,6 @@ /* + todo save spinner todo cancelling editing someone's else map return back to it's original address /razminochnyj/ @@ -29,6 +30,7 @@ OBLIVION STARTS HERE: + done dont close map list on click done fix loaded stickers has wrong text placement for right-sided captions done fix save button should not react to clicks done stickers with empty text should not have blackbox at view mode