Skip to content

Commit

Permalink
adding the selected observation state list
Browse files Browse the repository at this point in the history
  • Loading branch information
PhillipsOwen committed May 3, 2024
1 parent bc23082 commit 73c13bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/context/map-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export const useLayers = () => useContext(LayersContext);
export const LayersProvider = ({ children }) => {
const [defaultModelLayers, setDefaultModelLayers] = useState([]);
const [filteredModelLayers, setFilteredModelLayers] = useState([]);

// this object contains data for graph rendering
const [selectedObservations, setSelectedObservations] = useState([]);

const [map, setMap] = useState(null);

const toggleLayerVisibility = id => {
Expand Down Expand Up @@ -35,6 +39,8 @@ export const LayersProvider = ({ children }) => {
filteredModelLayers,
setFilteredModelLayers,
toggleLayerVisibility,
selectedObservations,
setSelectedObservations
}}
>
{children}
Expand Down

0 comments on commit 73c13bb

Please sign in to comment.