Skip to content

Commit 6cac803

Browse files
committed
Update set functions
1 parent 6a51416 commit 6cac803

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/floorplan/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export default function Page() {
88
useEffect(() => {
99
const watchID = navigator.geolocation.watchPosition(
1010
(position) => {
11-
setPositions(() => [position, ...positions]);
12-
setUpdateCount(() => updateCount + 1);
11+
setPositions((prev) => [position, ...prev]);
12+
setUpdateCount((currentCount) => currentCount + 1);
1313
},
1414
() => { },
1515
{ enableHighAccuracy: true }

0 commit comments

Comments
 (0)