--- import Layout from '../layouts/Main.astro'; //import { eq } from 'drizzle-orm'; import { db } from '../db'; //import * as schema from '../db/schema.ts'; // Get some sample Pokemon data from the database //const pokemon = await db.select().from(schema.cards).where(eq(schema.cards.productLineName, "pokemon")).limit(16); const pokemon = await db.query.cards.findMany({ where: { productLineName: "pokemon" }, limit: 16, with: { prices: true, } }); ---

Pokemon

{pokemon.map((card) => (
{card.productName}
{card.productName}
{card.number}
{card.prices.map((price) => (
{price.condition.split(' ').map((word) => word.charAt(0)).join('')}
{price.marketPrice}
))}
))}