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. ...@@ -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. Run the seed script to populate your database with `Product` and `Category` data.
`npx run seed` `npm run seed`
## Run the App ## Run the App
......
...@@ -5,13 +5,14 @@ export default function Product({ product }) { ...@@ -5,13 +5,14 @@ export default function Product({ product }) {
return ( return (
<div <div
className="max-w-xs rounded overflow-hidden shadow-lg" className="max-w-[250px] rounded overflow-hidden shadow-lg"
key={product.id} key={product.id}
> >
<Image <Image
className="w-full" className="w-full"
width={320} width={250}
height={160} height={250}
objectFit="cover"
src={image} src={image}
alt={name} alt={name}
/> />
......
...@@ -17,31 +17,31 @@ const categories = [ ...@@ -17,31 +17,31 @@ const categories = [
const products = [ const products = [
{ {
name: 'Cool hat.', name: 'Cool helmet.',
description: 'A nice hat to wear on your head', description: 'A nice helmet to wear on your head',
price: new Prisma.Decimal(19.95), price: new Prisma.Decimal(19.95),
image: '/images/placeholder.jpg', image: '/images/helmet.jpg',
category_id: 1, category_id: 1,
}, },
{ {
name: 'Grey T-Shirt', name: 'Grey T-Shirt',
description: 'A nice shirt that you can wear on your body', description: 'A nice shirt that you can wear on your body',
price: new Prisma.Decimal(22.95), price: new Prisma.Decimal(22.95),
image: '/images/placeholder.jpg', image: '/images/shirt.jpg',
category_id: 3, category_id: 3,
}, },
{ {
name: 'Socks', name: 'Socks',
description: 'Cool socks that you can wear on your feet', description: 'Cool socks that you can wear on your feet',
price: new Prisma.Decimal(12.95), price: new Prisma.Decimal(12.95),
image: '/images/placeholder.jpg', image: '/images/socks.jpg',
category_id: 2, category_id: 2,
}, },
{ {
name: 'Sweatshirt', name: 'Sweatshirt',
description: 'Cool sweatshirt that you can wear on your body', description: 'Cool sweatshirt that you can wear on your body',
price: new Prisma.Decimal(12.95), price: new Prisma.Decimal(12.95),
image: '/images/placeholder.jpg', image: '/images/sweatshirt.jpg',
category_id: 3, 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