{#if registrationsOfUser?.edges.length > 0 && !$page.url.pathname.startsWith('/bookings')} {@const registration = registrationsOfUser.edges[0].node} {#if shouldShowBooking($hiddenBookings, registration)}
{ const { target, detail: { event: { movementY, movementX }, }, } = event; if (!target || !(target instanceof HTMLElement)) return; if (Math.abs(Math.abs(movementX) - Math.abs(movementY)) < 10) return; if (Math.abs(movementX) < 10) return; target.style.transform = `translateX(${movementX > 0 ? '+' : '-'}100vw)`; setTimeout(() => { $hiddenBookings = [...$hiddenBookings, registration.id]; }, 500); }} class="quick-booking" >

C'est {#if isFuture(registration.ticket.event.startsAt)} dans {formatDistanceToNow(registration.ticket.event.startsAt, { locale: fr, }).replace('environ ', '')}{:else}maintenant{/if}! Voici ta place { $hiddenBookings = [...$hiddenBookings, registration.id]; }} >

{/if} {/if}