Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Aug 12, 2024
1 parent fe1b29d commit 56df128
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
8 changes: 7 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,13 @@ export default function App() {
return (
<SettingsContext.Provider value={settings}>
<div className={styles.appWrapper}>
<MapPopups map={map} pathDetails={pathDetails} mapFeatures={mapFeatures} poiState={pois} query={query} />
<MapPopups
map={map}
pathDetails={pathDetails}
mapFeatures={mapFeatures}
poiState={pois}
query={query}
/>
<ContextMenu map={map} route={route} queryPoints={query.queryPoints} />
{isSmallScreen ? (
<SmallScreenLayout
Expand Down
18 changes: 9 additions & 9 deletions src/layers/POIPopup.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react'
import styles from '@/layers/MapFeaturePopup.module.css'
import MapPopup from '@/layers/MapPopup'
import {POI, POIsStoreState} from '@/stores/POIsStore'
import {tr} from '@/translation/Translation'
import { POI, POIsStoreState } from '@/stores/POIsStore'
import { tr } from '@/translation/Translation'
import Dispatcher from '@/stores/Dispatcher'
import {SelectPOI, SetPoint, SetPOIs} from '@/actions/Actions'
import { SelectPOI, SetPoint, SetPOIs } from '@/actions/Actions'
import PlainButton from '@/PlainButton'
import {MarkerComponent} from '@/map/Marker'
import QueryStore, {QueryPoint, QueryPointType} from "@/stores/QueryStore";
import {Map} from "ol";
import { MarkerComponent } from '@/map/Marker'
import QueryStore, { QueryPoint, QueryPointType } from '@/stores/QueryStore'
import { Map } from 'ol'

function POITable(props: { poi: POI }) {
return (
Expand Down Expand Up @@ -91,14 +91,14 @@ export default function POIStatePopup({ map, poiState, points }: POIStatePopupPr
<div>{selectedPOI?.name}</div>
<div>{selectedPOI?.address}</div>
<div className={styles.poiPopupButton} onClick={() => fire(0)}>
<MarkerComponent color={QueryStore.getMarkerColor(QueryPointType.From)} size={18}/>
<MarkerComponent color={QueryStore.getMarkerColor(QueryPointType.From)} size={18} />
<PlainButton>{tr('As start')}</PlainButton>
</div>
<div className={styles.poiPopupButton} onClick={() => fire(points.length - 1)}>
<MarkerComponent color={QueryStore.getMarkerColor(QueryPointType.To)} size={18}/>
<MarkerComponent color={QueryStore.getMarkerColor(QueryPointType.To)} size={18} />
<PlainButton>{tr('As destination')}</PlainButton>
</div>
{selectedPOI && <POITable poi={selectedPOI}/>}
{selectedPOI && <POITable poi={selectedPOI} />}
<div className={styles.osmLink}>
<a href={'https://www.openstreetmap.org/' + type + '/' + selectedPOI?.osm_id} target="_blank">
OpenStreetMap.org
Expand Down
2 changes: 1 addition & 1 deletion src/map/MapPopups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { PathDetailsStoreState } from '@/stores/PathDetailsStore'
import { MapFeatureStoreState } from '@/stores/MapFeatureStore'
import { POI, POIsStoreState } from '@/stores/POIsStore'
import POIStatePopup from '@/layers/POIPopup'
import {QueryStoreState} from "@/stores/QueryStore";
import { QueryStoreState } from '@/stores/QueryStore'

interface MapPopupProps {
map: Map
Expand Down
5 changes: 1 addition & 4 deletions src/pois/AddressParseResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ export class AddressParseResult {
return new AddressParseResult(locations.join(' '), poiQuery, 'store', poiQuery.toString())
}

public static handleGeocodingResponse(
hits: ReverseGeocodingHit[],
parseResult: AddressParseResult
) {
public static handleGeocodingResponse(hits: ReverseGeocodingHit[], parseResult: AddressParseResult) {
if (hits.length == 0) {
Dispatcher.dispatch(new SetPOIs([]))
return
Expand Down

0 comments on commit 56df128

Please sign in to comment.