Skip to content

Commit

Permalink
Add a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rod-glover committed Jul 9, 2024
1 parent 096b8b4 commit 1b4310f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/map/DataMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ export default function DataMap({ dataset, variable, date }) {
} = useMonthly(variable, date);

// App state

// Layer visibility.
//
// This set of states could be formulated differently,
// but this way works fine. To ensure correct behaviour have to create a new
// state object every time state is updated. The overall goal of this state
// structure and the related callbacks is to minimize the number of places
// the state keys ("stationDataValueMarkers", etc.) are used as literals.
const [visibleLayers, setVisibleLayers] = useState({
stationDataValueMarkers: true,
monthlyStationLocationMarkers: false,
Expand Down

0 comments on commit 1b4310f

Please sign in to comment.