Skip to content

Commit 9057447

Browse files
committed
2 parents 32e6314 + ce8b5ef commit 9057447

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

src/routes/admin/stats.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ function AdminStatsPage() {
226226
<div className="flex-1 bg-gray-200 dark:bg-gray-600 h-2 rounded-full"></div>
227227
</div>
228228
<div className="flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1">
229-
<span>Active: {stats.ads.waitlistWithAdsDisabledCount}</span>
229+
<span>
230+
Active: {stats.ads.waitlistWithAdsDisabledCount}
231+
</span>
230232
<span>
231233
Waiting:{' '}
232234
{stats.ads.waitlistCount -
@@ -256,9 +258,10 @@ function AdminStatsPage() {
256258
{stats.ads.disabledCount.toLocaleString()}
257259
</div>
258260
<div className="text-xs text-gray-500 dark:text-gray-400 mt-1">
259-
{((stats.ads.disabledCount / stats.totalUsers) * 100).toFixed(
260-
1,
261-
)}
261+
{(
262+
(stats.ads.disabledCount / stats.totalUsers) *
263+
100
264+
).toFixed(1)}
262265
% of total users
263266
</div>
264267
</div>

src/utils/stats.server.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,7 @@ export const fetchNpmDownloadChunk = createServerFn({ method: 'GET' })
438438
if (!response.ok) {
439439
if (response.status === 404) {
440440
// Package not found or no data for this range
441-
console.warn(
442-
`[NPM Download Chunk] 404 for ${packageName} ${year}`,
443-
)
441+
console.warn(`[NPM Download Chunk] 404 for ${packageName} ${year}`)
444442
return {
445443
start: startDate,
446444
end: endDate,

src/utils/user-stats.server.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,7 @@ export const getUserStats = createServerFn({ method: 'POST' }).handler(
102102
.select({ count: sql<number>`count(*)::int` })
103103
.from(users)
104104
.where(
105-
and(
106-
eq(users.interestedInHidingAds, true),
107-
eq(users.adsDisabled, true),
108-
),
105+
and(eq(users.interestedInHidingAds, true), eq(users.adsDisabled, true)),
109106
)
110107

111108
const waitlistWithAdsDisabledCount =

0 commit comments

Comments
 (0)