routes: hiding map dialog on map select

This commit is contained in:
muerwre 2018-12-14 17:33:27 +07:00
parent c5b6fcf011
commit f325824da3
3 changed files with 17 additions and 6 deletions

View file

@ -9,14 +9,16 @@ type Props = {
created_at: String,
_id: String,
editing: Boolean,
openRoute: Function,
};
export const RouteRow = ({
title, distance, created_at, _id, editing
title, distance, created_at, _id, editing, openRoute,
}: Props) => (
<div
className="route-row"
onClick={() => pushPath(`/${_id}/${editing ? 'edit' : ''}`)}
onClick={() => openRoute(_id)}
>
<div className="route-title">
{title || _id}