From d7a915375189f2585e65ed536d130b80f706ee6e Mon Sep 17 00:00:00 2001 From: Akis Date: Sat, 25 Feb 2023 19:17:34 +0200 Subject: [PATCH] fix design for pubnix user count --- src/routes/pubnix/+page.server.ts | 1 - src/routes/pubnix/+page.svelte | 2 +- src/routes/pubnix/users/+page.svelte | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/routes/pubnix/+page.server.ts b/src/routes/pubnix/+page.server.ts index 1c33249..f48f33c 100644 --- a/src/routes/pubnix/+page.server.ts +++ b/src/routes/pubnix/+page.server.ts @@ -9,7 +9,6 @@ export const load = (async () => { return { users: get(pubnixUsers), - onlineUserCount: get(pubnixUsers).length, ...meta } }) satisfies PageServerLoad; diff --git a/src/routes/pubnix/+page.svelte b/src/routes/pubnix/+page.svelte index 516dc41..b2668bc 100644 --- a/src/routes/pubnix/+page.svelte +++ b/src/routes/pubnix/+page.svelte @@ -37,7 +37,7 @@ {#if !data.users.error} {#if data.users.users.some(isOnline)} -

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

+

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

{#each data.users.users as user} {#if user.online} diff --git a/src/routes/pubnix/users/+page.svelte b/src/routes/pubnix/users/+page.svelte index 87e75db..47fc32f 100644 --- a/src/routes/pubnix/users/+page.svelte +++ b/src/routes/pubnix/users/+page.svelte @@ -3,15 +3,13 @@ export let data: PageData; import User from "../User.svelte"; - - const userCount = data.users.users.length;

{data.title}

{#if !data.users.error} {#if data.users.users.length > 0} -

There are {userCount} users on the pubnix.

+

There are {data.users.users.length} users on the pubnix.

{#each data.users.users as user}