Matches — Vash Esports

Matches

{data.matches.length} match{data.matches.length !== 1 ? 'es' : ''} {#if liveMatches.length > 0} · {liveMatches.length} live {/if}

{#if (formData ?? data).userTeams?.length > 0} {/if} {#if data.canCreateMatch} {/if}
{#if showCreate && data.canCreateMatch}
{ createError = ''; return async ({ result, update }) => { if ( result.type === 'failure' || (result.type === 'success' && (result.data as any)?.error) ) { createError = (result.data as any)?.error ?? 'Failed to create match'; } else { await update(); } }; }} class="mt-4 rounded-lg border border-accent/20 bg-surface-800 p-5" >

Create Match

{#if createError}

{createError}

{/if}
{/if} {#if showInvite}
{ inviteError = ''; inviteSuccess = false; return async ({ result, update }) => { if ( result.type === 'failure' || (result.type === 'success' && (result.data as any)?.error) ) { inviteError = (result.data as any)?.error ?? 'Failed to send invite'; } else if (result.type === 'success' && (result.data as any)?.inviteSuccess) { inviteSuccess = true; await invalidateAll(); setTimeout(() => { showInvite = false; inviteSuccess = false; }, 2000); } else { await update(); } }; }} class="mt-4 rounded-lg border border-accent/20 bg-surface-800 p-5" >

Challenge

{#if inviteError}

{inviteError}

{/if} {#if inviteSuccess}

Invite sent!

{/if}
{#if hasMultipleTeams}
{/if}
{#if selectedInvitedTeam}
{teamDisplayName(selectedInvitedTeam)} ({selectedInvitedTeam.memberCount} player{selectedInvitedTeam.memberCount !== 1 ? 's' : ''})
{:else if opponentSearch}
{#each filteredOpponentTeams.slice(0, 20) as t} {:else}
No results
{/each}
{/if}
Best Of
{#each [3, 5, 7, 9, 11, 13] as n} {/each} (useCustomBo = true)} oninput={() => (useCustomBo = true)} class="w-20 rounded-md border {useCustomBo ? 'border-accent' : 'border-border'} bg-surface-700 px-2 py-1.5 text-xs text-text-primary placeholder:text-text-secondary/50 focus:border-accent focus:outline-none" />
{#if !creatorIsPersonal && creatorMaxSize > 1}
{:else} {/if} {#if selectedInvitedTeam && !selectedInvitedTeam.isPersonal && invitedMaxSize > 1}
{:else} {/if}
{/if} {#if liveMatches.length > 0}

Live Now (max 4 until osu! gives me bot account lol)

{/if}
{#if liveMatches.length > 0}

Past Matches

{/if}