We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a51416 commit 6cac803Copy full SHA for 6cac803
src/app/floorplan/page.tsx
@@ -8,8 +8,8 @@ export default function Page() {
8
useEffect(() => {
9
const watchID = navigator.geolocation.watchPosition(
10
(position) => {
11
- setPositions(() => [position, ...positions]);
12
- setUpdateCount(() => updateCount + 1);
+ setPositions((prev) => [position, ...prev]);
+ setUpdateCount((currentCount) => currentCount + 1);
13
},
14
() => { },
15
{ enableHighAccuracy: true }
0 commit comments