diff --git a/src/app/story/[id]/page.tsx b/src/app/story/[id]/page.tsx index cb1190f..6630fa7 100644 --- a/src/app/story/[id]/page.tsx +++ b/src/app/story/[id]/page.tsx @@ -1,4 +1,5 @@ -import prisma from "../../lib/db.mjs" +// "use server" +import prisma from "app/lib/db" async function getStory(id: string) { const story = await prisma.story.findFirst({ where: { id: Number(id) } }) diff --git a/tsconfig.json b/tsconfig.json index ccb2ed9..af33da5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "baseUrl": "src/", "lib": [ "dom", "dom.iterable", @@ -26,7 +27,8 @@ "next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", - "**/*.tsx" + "**/*.tsx", + "src/app/lib/db.ts" ], "exclude": [ "node_modules"