Skip to content

Commit

Permalink
レビューテスト用にバグを仕込む(難易度3と5)
Browse files Browse the repository at this point in the history
  • Loading branch information
User committed Jan 12, 2026
1 parent 0f32688 commit 66d8fb0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/TodoList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function TodoList() {

useEffect(() => {
fetchTodos()
}, [])
}, [fetchTodos])

const handleTodoUpdate = () => {
fetchTodos()
Expand Down
8 changes: 6 additions & 2 deletions lib/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const globalForPrisma = globalThis as unknown as {
prisma: PrismaClient | undefined
}

export const prisma = globalForPrisma.prisma ?? new PrismaClient()
export const prisma = globalForPrisma.prisma ?? new PrismaClient({
log: process.env.NODE_ENV === 'development' ? ['query', 'error', 'warn'] : ['error'],
})

if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma
if (process.env.NODE_ENV !== 'production') {
globalForPrisma.prisma = prisma
}

0 comments on commit 66d8fb0

Please sign in to comment.