vendor slugs routes instead of ids
This commit is contained in:
@@ -14,6 +14,7 @@ import { useRouter } from 'next/navigation'
|
||||
|
||||
interface VendorRow {
|
||||
id: string
|
||||
slug: string
|
||||
name: string
|
||||
type: VendorType
|
||||
description?: string | null
|
||||
@@ -189,7 +190,7 @@ export default function VendorsTable({ initialVendors }: Props) {
|
||||
|
||||
// Handle row click
|
||||
const handleRowClick = (vendor: VendorRow) => {
|
||||
router.push(`/vendors/${vendor.id}`)
|
||||
router.push(`/vendors/${vendor.slug}`)
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user