feat: implement product categories with tabbed filtering and admin configuration

This commit is contained in:
DanielS
2026-05-01 00:52:40 +02:00
parent 9c0164c4fe
commit 316d9510a8
9 changed files with 948 additions and 29 deletions

View File

@@ -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} />
}