✨ Add loading spinner
This commit is contained in:
@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user