From f423cdabfe4f7cf2662dfbd589c5191b4e517885 Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Thu, 28 Jul 2022 18:48:26 +0200 Subject: [PATCH] Hint about filters not being applied in road info popover --- frontend/src/pages/MapPage/RoadInfo.tsx | 30 +++++-------------------- frontend/src/pages/MapPage/index.tsx | 1 - 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/frontend/src/pages/MapPage/RoadInfo.tsx b/frontend/src/pages/MapPage/RoadInfo.tsx index 8020ebc..186ebe7 100644 --- a/frontend/src/pages/MapPage/RoadInfo.tsx +++ b/frontend/src/pages/MapPage/RoadInfo.tsx @@ -1,6 +1,6 @@ import React, {useState, useCallback} from 'react' import _ from 'lodash' -import {Segment, Menu, Header, Label, Icon, Table, Message, Button} from 'semantic-ui-react' +import {Segment, Menu, Header, Label, Icon, Table} from 'semantic-ui-react' import {Layer, Source} from 'react-map-gl' import {of, from, concat} from 'rxjs' import {useObservable} from 'rxjs-hooks' @@ -8,9 +8,8 @@ import {switchMap, distinctUntilChanged} from 'rxjs/operators' import {Chart} from 'components' import {pairwise} from 'utils' -import type { Location } from "types"; -import api from "api"; -import { colorByDistance, borderByZone } from "mapstyles"; +import api from 'api' +import {colorByDistance, borderByZone} from 'mapstyles' import styles from "./styles.module.less"; @@ -128,15 +127,7 @@ function HistogramChart({ bins, counts, zone }) { ); } -export default function RoadInfo({ - clickLocation, - hasFilters, - onClose, -}: { - clickLocation: Location | null; - hasFilters: boolean; - onClose: () => void; -}) { +export default function RoadInfo({ clickLocation }) { const { t } = useTranslation(); const [direction, setDirection] = useState("forwards"); @@ -205,17 +196,8 @@ export default function RoadInfo({ /> - {hasFilters && ( - - - - {t("MapPage.roadInfo.hintFiltersNotApplied")} - - - )} - - {info.road.zone && ( -