Improve loading states

This commit is contained in:
Sebastien Castiel
2023-12-14 12:34:15 -05:00
parent 80c4baa0e1
commit 7e279a535d
4 changed files with 56 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ import { PrismaClient } from '@prisma/client'
let prisma: PrismaClient
export async function getPrisma() {
// await delay(1000)
if (!prisma) {
if (process.env.NODE_ENV === 'production') {
prisma = new PrismaClient()