vendor slugs routes instead of ids
This commit is contained in:
@@ -4,16 +4,16 @@ import { prisma } from '@/lib/prisma'
|
||||
import { VendorDetailPage } from '@/components/vendor/VendorDetailPage'
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
id: string
|
||||
}
|
||||
params: {
|
||||
slug: string
|
||||
}
|
||||
}
|
||||
|
||||
export default async function Page({ params }: PageProps) {
|
||||
const { id } = params
|
||||
const { slug } = params
|
||||
|
||||
const vendor = await prisma.vendor.findUnique({
|
||||
where: { id },
|
||||
where: { slug },
|
||||
include: {
|
||||
address: true,
|
||||
events: {
|
||||
Reference in New Issue
Block a user