i need some help
so i setup prisma im trayng to fetch data
import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
export async function getServerSideProps() {
const transactions = await prisma.transaction.findMany();
return {
props: {
transactions,
},
};
}
{transactions &&
transactions.map((transaction) => (
<tr
key={transaction.id}
className="bg-white border-b dark:bg-gray-800 dark:border-gray-700"
>
<td className="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
{transaction.type}
</td>
<td className="px-6 py-4">{transaction.amount}</td>
<td className="px-6 py-4">{transaction.description}</td>
<td className="px-6 py-4 text-right">
<button className="text-blue-500">Edit</button>
</td>
</tr>
))}
there is no data maped though and i dont know why