Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add loading state to linked events #654

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

casperboone
Copy link
Member

@casperboone casperboone commented Jan 12, 2025

Before:

load_before.mov

After:

load_after.mov

A bit less jarring

@@ -47,22 +47,38 @@ onMounted(() => {

<template>
<section
v-if="events && events.length > 0"
v-if="events === null || events.length > 0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dit moet events !== null zijn lijkt me?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Als events gelijk is aan null, dan is er nog niks geset, dus zijn we nog aan het loaden.

Als events een lege array is hebben we wel wat geset, en dan zijn we klaar met loaden.

Vandaar dat we ook de case willen dat het null is en onderstaand dus tonen in alle gevallen behalve events.length === 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants