Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor adjustments to MySQL example. #34792

Merged
merged 1 commit into from Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 not shown.
Binary file not shown.