Join Crew | Hensei
{#if invitationsQuery.isLoading}

Loading invitations...

{:else if invitationsQuery.isError}

Failed to load invitations

{:else if !invitationsQuery.data || invitationsQuery.data.length === 0}

You don't have any pending invitations.

Ask a crew captain or vice captain to send you an invitation.

{:else}
{#each invitationsQuery.data as invitation} {@const expired = isExpired(invitation.expiresAt)} {@const highlighted = invitation.id === selectedInvitationId} {@const crew = invitation.crew} {@const invitedBy = invitation.invitedBy} {#if crew && invitedBy}

{crew.name}

{#if crew.gamertag} [{crew.gamertag}] {/if}
{#if 'description' in crew && crew.description}

{crew.description}

{/if}
Invited by {invitedBy.username} {formatDate(invitation.createdAt)}
{#if 'memberCount' in crew && crew.memberCount !== undefined}
{crew.memberCount} member{crew.memberCount === 1 ? '' : 's'}
{/if} {#if expired}
This invitation has expired.
{:else}
Expires: {formatDate(invitation.expiresAt)}
{/if}
{/if} {/each}
{/if}