User card (#3213)
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run

This commit is contained in:
Kalle
2026-07-05 08:28:42 +03:00
committed by GitHub
parent f25a2e410c
commit a4dfd82141
146 changed files with 4049 additions and 1078 deletions

View File

@@ -1,5 +1,6 @@
import { db } from "~/db/sql";
import type { Tables, TablesInsertable } from "~/db/tables";
import { peakXpOverallSql } from "~/features/top-search/XRankPlacementRepository.server";
import { commonUserSelect } from "~/utils/kysely.server";
import * as StreamRanking from "../sidebar/core/StreamRanking";
@@ -34,15 +35,11 @@ export function findXRankStreams() {
.selectFrom("LiveStream")
.innerJoin("User", "User.twitch", "LiveStream.twitch")
.innerJoin("SplatoonPlayer", "SplatoonPlayer.userId", "User.id")
.where(
"SplatoonPlayer.peakXp",
">=",
StreamRanking.minXpForStreamToBeShown(),
)
.where(peakXpOverallSql(), ">=", StreamRanking.minXpForStreamToBeShown())
.where("LiveStream.twitch", "is not", null)
.select((eb) => [
...commonUserSelect(eb),
"SplatoonPlayer.peakXp",
peakXpOverallSql<number>().as("peakXp"),
"LiveStream.viewerCount",
"LiveStream.thumbnailUrl",
"LiveStream.twitch as twitchUsername",