Pubnix
Register
Users

Online users

{#if !data.users.error} {#if data.users.users.some(isOnline)}

There {onlineUserCount === 1 ? "is" : "are"} {onlineUserCount} {onlineUserCount === 1 ? "user" : "users"} online out of {userCount} users.

{#each data.users.users as user} {#if user.online} {/if} {/each}
{:else}

No users online

{/if} {:else}

{data.users.message}

{/if}