mirror of
https://git.meshkee.com/BaloutPastry/website.git
synced 2026-08-11 22:31:01 +04:30
Initial commit of Balout Pastry public website.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { isCuid } from '../lib/ids'
|
||||
import ProductDetailPage from './ProductDetailPage'
|
||||
import ProductsListPage from './ProductsListPage'
|
||||
|
||||
/** `/products/:slugOrId` — category slug list, or product detail when cuid. */
|
||||
export default function ProductsSlugOrDetailPage() {
|
||||
const { slugOrId = '' } = useParams()
|
||||
if (isCuid(slugOrId)) {
|
||||
return <ProductDetailPage />
|
||||
}
|
||||
return <ProductsListPage />
|
||||
}
|
||||
Reference in New Issue
Block a user