--- //import { eq } from 'drizzle-orm'; import { isConditionalExpression } from 'typescript'; import { db } from '../db'; import RarityIcon from './RarityIcon.astro'; //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(256); const pokemon = await db.query.cards.findMany({ where: { productLineName: "pokemon", }, orderBy: (cards, { desc }) => [desc(cards.marketPrice)], limit: 320, with: { prices: true, set: true, } }); const formatPrice = (price:any) => { if (price === null) { return "–"; } price = Number(price); if (price >= 99.99) { return `${Math.round(price)}`; } return `${price.toFixed(2)}`; }; const order = ["Near Mint", "Lightly Played", "Moderately Played", "Heavily Played", "Damaged"]; --- {pokemon.map((card) => (