Unverified Commit 5ebee5f5 authored by Lee Robinson's avatar Lee Robinson Committed by GitHub

Some minor adjustments to MySQL example. (#34792)

parent 3ee458e3
......@@ -75,7 +75,7 @@ Push the database schema to your PlanetScale database using Prisma.
Run the seed script to populate your database with `Product` and `Category` data.
`npx run seed`
`npm run seed`
## Run the App
......
......@@ -5,13 +5,14 @@ export default function Product({ product }) {
return (
<div
className="max-w-xs rounded overflow-hidden shadow-lg"
className="max-w-[250px] rounded overflow-hidden shadow-lg"
key={product.id}
>
<Image
className="w-full"
width={320}
height={160}
width={250}
height={250}
objectFit="cover"
src={image}
alt={name}
/>
......
......@@ -17,31 +17,31 @@ const categories = [
const products = [
{
name: 'Cool hat.',
description: 'A nice hat to wear on your head',
name: 'Cool helmet.',
description: 'A nice helmet to wear on your head',
price: new Prisma.Decimal(19.95),
image: '/images/placeholder.jpg',
image: '/images/helmet.jpg',
category_id: 1,
},
{
name: 'Grey T-Shirt',
description: 'A nice shirt that you can wear on your body',
price: new Prisma.Decimal(22.95),
image: '/images/placeholder.jpg',
image: '/images/shirt.jpg',
category_id: 3,
},
{
name: 'Socks',
description: 'Cool socks that you can wear on your feet',
price: new Prisma.Decimal(12.95),
image: '/images/placeholder.jpg',
image: '/images/socks.jpg',
category_id: 2,
},
{
name: 'Sweatshirt',
description: 'Cool sweatshirt that you can wear on your body',
price: new Prisma.Decimal(12.95),
image: '/images/placeholder.jpg',
image: '/images/sweatshirt.jpg',
category_id: 3,
},
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment