Skip to content

Commit

Permalink
refactor(frontend): shared map components (#55)
Browse files Browse the repository at this point in the history
`BaseMap` and `DataMap` both depend on modules outside the `lib` directory now, so move them to the `map` directory.
  • Loading branch information
eatyourgreens authored Jul 1, 2024
1 parent ffbdf68 commit 8d71116
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import { backgroundState, showLabelsState } from 'map/layers/layers-state';
import { useBasemapStyle } from 'map/use-basemap-style';
import { useInteractions } from 'lib/state/interactions/use-interactions';

import { useTriggerMemo } from '../hooks/use-trigger-memo';
import { useDataLoadTrigger } from './use-data-load-trigger';
import { useTriggerMemo } from 'lib/hooks/use-trigger-memo';
import { useDataLoadTrigger } from 'lib/data-map/use-data-load-trigger';

import { DeckGLOverlay } from '../map/DeckGLOverlay';
import { ViewLayer, ViewLayerParams } from './view-layers';
import { DeckGLOverlay } from 'lib/map/DeckGLOverlay';
import { ViewLayer, ViewLayerParams } from 'lib/data-map/view-layers';
import { LayersList } from 'deck.gl/typed';

// set a convention where the view layer id is either the first part of the deck id before the @ sign, or it's the whole id
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/map/MapView.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Suspense, useCallback } from 'react';
import { useSetRecoilState } from 'recoil';

import { BaseMap } from 'lib/data-map/BaseMap';
import { DataMap } from 'lib/data-map/DataMap';
import { BaseMap } from './BaseMap';
import { DataMap } from './DataMap';
import { DataMapTooltip } from 'lib/data-map/DataMapTooltip';
import { MapBoundsFitter, mapFitBoundsState } from 'lib/map/MapBoundsFitter';
import { MapHud } from 'lib/map/hud/MapHud';
Expand Down

0 comments on commit 8d71116

Please sign in to comment.