wine-shop/src/app/_components/AllCountries.tsx
ChrQR e70ff89833
All checks were successful
Vercel Production Deployment / Deploy-Production (push) Successful in 1m24s
added card to show all wines in db
2024-05-28 15:39:21 +02:00

14 lines
339 B
TypeScript

import { db } from "~/server/db";
export default async function AllCountries() {
const countries = await db.query.countries.findMany();
return (
<div className="pt-4">
<h1 className="text-2xl">All Countries:</h1>
{countries.map((country) => (
<p key={country.id}>{country.name}</p>
))}
</div>
);
}