import { createClient } from '@/lib/supabase/server'
import { getProducts, getCategories } from '@/lib/actions/products'
import { getEndCustomers } from '@/lib/actions/end-customers'
import { OrderWizard } from '@/components/order-wizard'
import { redirect } from 'next/navigation'
import { Suspense } from 'react'
export default async function OrderPage() {
return (
Konfigurieren Sie Ihre Lösung
Wählen Sie das passende Paket und die benötigten Module für Ihr Business.
}>
)
}
async function OrderDataWrapper() {
const supabase = await createClient()
const { data: { user } } = await supabase.auth.getUser()
if (!user) {
redirect('/auth/login')
}
const products = await getProducts()
const categories = await getCategories()
const endCustomers = await getEndCustomers()
// Fetch profile if exists
const { data: profile } = await supabase
.from('profiles')
.select('*')
.eq('id', user.id)
.single()
return
}