Skip to content

Commit

Permalink
Some minor adjustments to MySQL example. (#34792)
Browse files Browse the repository at this point in the history
  • Loading branch information
leerob committed Feb 25, 2022
1 parent 3ee458e commit 5ebee5f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/with-mysql/README.md
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions examples/with-mysql/components/Product.js
Expand Up @@ -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}
/>
Expand Down
12 changes: 6 additions & 6 deletions examples/with-mysql/prisma/data.js
Expand Up @@ -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,
},
]
Expand Down
Binary file removed examples/with-mysql/public/images/astronaut-suit.jpg
Binary file not shown.
Binary file removed examples/with-mysql/public/images/placeholder.jpg
Binary file not shown.

0 comments on commit 5ebee5f

Please sign in to comment.