From eda5adf19bb3e655afb8eef3b2dff0c9136e43bf Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Sun, 26 Feb 2023 11:34:22 +0530 Subject: [PATCH] fix grammar when only one user is online --- src/routes/pubnix/+page.svelte | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/routes/pubnix/+page.svelte b/src/routes/pubnix/+page.svelte index b2668bc..81b7e6b 100644 --- a/src/routes/pubnix/+page.svelte +++ b/src/routes/pubnix/+page.svelte @@ -36,7 +36,16 @@

Online users

{#if !data.users.error} - {#if data.users.users.some(isOnline)} + {#if onlineUserCount == 1} +

There is {onlineUserCount} user online out of {userCount} users.

+
+ {#each data.users.users as user} + {#if user.online} + + {/if} + {/each} +
+ {:else if onlineUserCount > 1}

There are {onlineUserCount} users online out of {userCount} users.

{#each data.users.users as user} @@ -46,7 +55,7 @@ {/each}
{:else} -

No users online

+

No users online out of {userCount} users.

{/if} {:else}

{data.users.message}