Add loading spinner

This commit is contained in:
2022-06-02 21:55:59 +02:00
parent bb2891a968
commit 72c8b3adc1
4 changed files with 68 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import {
selectedDay,
fetchSubstitutions,
fetchHistory,
loading,
} from "../store";
import { dayNames } from "../definitions";
import dayjs from "dayjs";
@ -23,8 +24,10 @@ function previousDay() {
}
async function changeDate(newDate) {
selectedDate.value = new Date(newDate.toDate().setUTCHours(0, 0, 0, 0));
loading.value = true;
await fetchSubstitutions();
await fetchHistory();
loading.value = false;
}
</script>