mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2024-11-17 06:19:25 +08:00
Added code comments
This commit is contained in:
parent
40c52f1419
commit
473291646c
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
}, []);
|
||||
|
|
Loading…
Reference in a new issue