From d54b8180cea8d78eb292d5df082b34c32ae35dd4 Mon Sep 17 00:00:00 2001 From: andrzej Date: Tue, 11 Jun 2024 19:13:56 +0200 Subject: [PATCH] fix imports --- src/app/story/[id]/page.tsx | 3 ++- tsconfig.json | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) 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"