fix(art): widg no count special
Build and Push Image / build-backend (push) Successful in 1m40s
Build and Push Image / build-frontend (push) Successful in 3m22s
Build and Push Image / push (push) Successful in 1m26s

This commit is contained in:
2026-06-10 22:24:30 +07:00 Unverified
parent d57a98dc6a
commit cfc00fe8ce
+6 -1
View File
@@ -6,6 +6,7 @@ import AutoFitText from "@/components/fit";
import { getArtifactConfig } from "@/lib/api";
import { db } from "@/lib/db";
import { submissions } from "@/lib/db/schema";
import { isNotNull, sql } from "drizzle-orm";
const kanit = Kanit({
variable: "--font-kanit",
@@ -15,7 +16,11 @@ const kanit = Kanit({
export default async function ArtifactCountWidget() {
const config = await getArtifactConfig();
const count = await db.$count(submissions);
const count = await db
.select({ a: sql`NULL` })
.from(submissions)
.where(isNotNull(submissions.queue))
.then((e) => e.length);
const display = `${count} / ${config.limit < 0 ? "∞" : config.limit}`;