feat: implement product categories with tabbed filtering and admin configuration
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { createClient } from '@/lib/supabase/server'
|
||||
import { getProducts } from '@/lib/actions/products'
|
||||
import { getProducts, getCategories } from '@/lib/actions/products'
|
||||
import { OrderWizard } from '@/components/order-wizard'
|
||||
import { redirect } from 'next/navigation'
|
||||
import { Suspense } from 'react'
|
||||
@@ -34,6 +34,7 @@ async function OrderDataWrapper() {
|
||||
}
|
||||
|
||||
const products = await getProducts()
|
||||
const categories = await getCategories()
|
||||
|
||||
// Fetch profile if exists
|
||||
const { data: profile } = await supabase
|
||||
@@ -42,5 +43,5 @@ async function OrderDataWrapper() {
|
||||
.eq('id', user.id)
|
||||
.single()
|
||||
|
||||
return <OrderWizard products={products} initialProfile={profile} />
|
||||
return <OrderWizard products={products} categories={categories} initialProfile={profile} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user