Skip to content

Commit

Permalink
frontend: update charger list periodically. temporary fix for #77
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreddow committed Sep 18, 2024
1 parent 16440ae commit dd5d8ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/components/charger_list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ export class ChargerListComponent extends Component<{}, ChargerListComponentStat
showModal: false,
};

this.updateChargers();
setInterval(this.updateChargers, 5000);
}

updateChargers() {
fetch(BACKEND + "/charger/get_chargers", {
credentials: "include"
}).then(async (resp) => {
Expand Down

0 comments on commit dd5d8ef

Please sign in to comment.