{#each accounts as account (account.did)} {@const isActive = account.did === did}
doSwitch(account)} disabled={isActive || !!switchingTo} aria-current={isActive ? 'true' : undefined} >
{account.displayName || account.handle || account.did}
{#if account.handle}
@{account.handle}
{/if}
{#if isActive}
{:else if switchingTo === account.did}
Switching…
{/if}
{#if !isActive}
doForget(account)} aria-label="Remove {account.handle || account.did}">
{/if}
{/each}
($loginModalOpen = true)}>
Add another account
{#if did}
Sign Out
{/if}