Skip to content

Commit

Permalink
fix small behaviour around loading
Browse files Browse the repository at this point in the history
  • Loading branch information
probablyjassin committed Nov 12, 2024
1 parent 9f05fb1 commit 844022c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pages/stundenplan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}}
</p>

<span v-if="!data.length" class="space-y-3">
<span v-if="!isMounted" class="space-y-3">
<USkeleton class="mb-4 h-8 w-80" :ui="{ rounded: 'rounded-xl' }" />
<USkeleton class="mb-4 h-8 w-80" :ui="{ rounded: 'rounded-xl' }" />
<USkeleton class="mb-4 h-64 w-full" :ui="{ rounded: 'rounded-xl' }" />
Expand Down Expand Up @@ -52,6 +52,7 @@ const localData = ref([]);
const username = useCookie("username");
const password = useCookie("password");
const isLoggedIn = useState("isLoggedIn", (() => false))
const isMounted = ref(false);
const today = new Date().setHours(0, 0, 0, 0);
const page = useState("page", (() => 1));
Expand Down Expand Up @@ -103,6 +104,7 @@ watch(groupedByDay, (newVal) => {
});
onMounted(async () => {
isMounted.value = true;
if (data.value.length !== 0) return;
const storedValue = localStorage.getItem('stundenplan');
Expand Down

0 comments on commit 844022c

Please sign in to comment.