feat: add win count display for today's character in the UI
All checks were successful
Build Docker Image / build (push) Successful in 1m24s
All checks were successful
Build Docker Image / build (push) Successful in 1m24s
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { error } from '@sveltejs/kit';
|
||||
import { db } from '$lib/server/db';
|
||||
import { config } from '$lib/server/db/schema';
|
||||
import { getDailyModeCharacters, getOrCreateTodayCharacter, getYesterdayCharacter } from '$lib/server/daily-character';
|
||||
import { getDailyModeCharacters, getOrCreateTodayCharacter, getYesterdayCharacter, getTodayCharacterWinsCount } from '$lib/server/daily-character';
|
||||
import { like } from 'drizzle-orm';
|
||||
|
||||
export async function load() {
|
||||
@@ -14,6 +14,9 @@ export async function load() {
|
||||
|
||||
const yesterdayCharacter = await getYesterdayCharacter(new Date(), characters);
|
||||
|
||||
// Load the win count for today
|
||||
const winCount = await getTodayCharacterWinsCount(dailyCharacter.id);
|
||||
|
||||
// Load column visibility config
|
||||
const columnConfig = await db
|
||||
.select()
|
||||
@@ -33,6 +36,7 @@ export async function load() {
|
||||
characters,
|
||||
dailyCharacter,
|
||||
yesterdayCharacter,
|
||||
columnVisibility
|
||||
columnVisibility,
|
||||
winCount
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user