Refactor Docker Compose files, Tailwind config, UserCard component, and page server files

This commit is contained in:
Sean Morley
2024-04-27 16:35:04 +00:00
parent 3299855f86
commit b057ee01b3
7 changed files with 82 additions and 202 deletions

View File

@@ -35,9 +35,17 @@ export const actions: Actions = {
// change the theme only if it is one of the allowed themes
if (
theme &&
["light", "dark", "night", "retro", "forest", "aqua", "forest"].includes(
theme
)
[
"light",
"dark",
"night",
"retro",
"forest",
"aqua",
"forest",
"garden",
"emerald",
].includes(theme)
) {
cookies.set("colortheme", theme, {
path: "/",

View File

@@ -8,7 +8,7 @@ import {
userVisitedWorldTravel,
} from "$lib/db/schema";
import type { DatabaseUser } from "$lib/server/auth";
import { count } from "drizzle-orm";
import { count, eq } from "drizzle-orm";
export const load: PageServerLoad = async (event) => {
let users: DatabaseUser[] = [];
@@ -26,6 +26,7 @@ export const load: PageServerLoad = async (event) => {
visitCount = (await db
.select({ count: count() })
.from(adventureTable)
.where(eq(adventureTable.type, "mylog"))
.execute()) as unknown as number;
userCount = (await db
.select({ count: count() })