Skip to content

Commit

Permalink
edit visited count to be values with "visited" in local storage
Browse files Browse the repository at this point in the history
  • Loading branch information
jones58 committed Sep 26, 2024
1 parent 90596cb commit d58210d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/visitedCount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ const VisitedCount: React.FC = () => {
useEffect(() => {
const calculateVisitedNumber = () => {
const visitedNumber = Object.keys(localStorage).filter(
(key) => !/mapbox/.test(key)
(key) => localStorage.getItem(key) === "visited"
).length;

setCount(visitedNumber);
};
calculateVisitedNumber();
Expand Down

0 comments on commit d58210d

Please sign in to comment.