Added code comments

This commit is contained in:
Keannu Bernasol 2023-07-25 14:17:28 +08:00
parent 40c52f1419
commit 473291646c

View file

@ -37,6 +37,8 @@ export default function Home() {
}
}
}
// Refresh every 10 seconds
useEffect(() => {
const interval = setInterval(() => {
requestLocation();
@ -44,6 +46,8 @@ export default function Home() {
return () => clearInterval(interval);
});
// Run when screen loads
useEffect(() => {
requestLocation();
}, []);