diff --git a/next.config.ts b/next.config.ts index dd29a84954..a42205434b 100644 --- a/next.config.ts +++ b/next.config.ts @@ -21,13 +21,7 @@ const securityHeaders = [ const nextConfig: NextConfig = { turbopack: {}, - serverExternalPackages: [ - "mariadb", - "lzma", - "sharp", - "pino", - "pino-pretty", - ], + serverExternalPackages: ["mariadb", "lzma", "sharp", "pino", "pino-pretty"], // Enable React Compiler for automatic memoization reactCompiler: true, diff --git a/src/actions/users.ts b/src/actions/users.ts index b7210f2203..5a780c9e71 100644 --- a/src/actions/users.ts +++ b/src/actions/users.ts @@ -2,8 +2,8 @@ import crypto from "node:crypto"; import { z } from "zod"; -import { hashPassword } from "@/lib/auth/password"; import { invalidateLoginCache } from "@/lib/auth"; +import { hashPassword } from "@/lib/auth/password"; import { PERMS } from "@/lib/permissions"; import { prisma } from "@/lib/prisma"; import { adminAction } from "@/lib/safe-action"; diff --git a/src/app/api/online/route.ts b/src/app/api/online/route.ts index 761e923b08..58f34bf6c0 100644 --- a/src/app/api/online/route.ts +++ b/src/app/api/online/route.ts @@ -12,15 +12,12 @@ export const dynamic = "force-dynamic"; export async function GET(_req: Request) { try { - const users = await cached( - "online_users", - 10_000, - async () => - prisma.user.findMany({ - where: { online: "1" }, - select: { username: true, look: true }, - take: 100, - }), + const users = await cached("online_users", 10_000, async () => + prisma.user.findMany({ + where: { online: "1" }, + select: { username: true, look: true }, + take: 100, + }), ); return apiJson({ users }); diff --git a/src/app/globals.css b/src/app/globals.css index d0f6a87f60..957a69b6d2 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -5,7 +5,8 @@ @custom-variant dark (&:where(.dark, .dark *)); :root { - --font-nunito: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; + --font-nunito: + "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; --font-pixel: "Pixelify Sans", monospace; } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index cf2c39ceef..7fb72146cc 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -52,14 +52,15 @@ export default async function RootLayout({ const nonce = (await headers()).get("x-nonce") ?? undefined; return ( - +
- + ( return JSON.parse(cached) as T; } } catch (err) { - logger.warn("[cache] read failed, falling back to DB", { key: cacheKey, error: String(err) }); + logger.warn("[cache] read failed, falling back to DB", { + key: cacheKey, + error: String(err), + }); } const result = await queryFn(); @@ -42,15 +45,17 @@ export async function cachedQuery