From 02e014b0a0e2917380aca8efedba1439708f1933 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Thu, 28 Aug 2025 14:09:34 -0400 Subject: [PATCH] ignore: cloud --- cloud/app/src/context/auth.tsx | 5 ++--- cloud/core/src/drizzle/index.ts | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cloud/app/src/context/auth.tsx b/cloud/app/src/context/auth.tsx index 88d3214c..d6c5887c 100644 --- a/cloud/app/src/context/auth.tsx +++ b/cloud/app/src/context/auth.tsx @@ -32,7 +32,7 @@ export const getActor = query(async (): Promise => { }, } } - if (Object.keys(auth.data.account).length > 0) { + if (Object.keys(auth.data.account ?? {}).length > 0) { const current = Object.values(auth.data.account)[0] await auth.update(val => ({ ...val, @@ -96,10 +96,9 @@ export interface AuthSession { } export function useAuthSession() { - return useSession({ password: "0".repeat(32), - name: "auth" + name: "auth", }) } diff --git a/cloud/core/src/drizzle/index.ts b/cloud/core/src/drizzle/index.ts index 46fe93ac..1d448bbe 100644 --- a/cloud/core/src/drizzle/index.ts +++ b/cloud/core/src/drizzle/index.ts @@ -3,7 +3,7 @@ import { Resource } from "sst" export * from "drizzle-orm" import postgres from "postgres" -const createClient = memo(() => { +const createClient = () => { const client = postgres({ idle_timeout: 30000, connect_timeout: 30000, @@ -17,9 +17,8 @@ const createClient = memo(() => { }, max: 1, }) - return drizzle(client, {}) -}) +} import { PgTransaction, type PgTransactionConfig } from "drizzle-orm/pg-core" import type { ExtractTablesWithRelations } from "drizzle-orm"