feat(admin): extend wysiwyg live editor
All checks were successful
Staging Build / build (push) Successful in 2m46s
All checks were successful
Staging Build / build (push) Successful in 2m46s
- Add is_required and allow_multiselect category toggles - Implement module-popover for product module assignment - Add cascade-protected deletion for categories and products - Add sidebar link with AdminNavLink active states
This commit is contained in:
@@ -26,8 +26,23 @@ export default async function WysiwygAdminPage() {
|
||||
)
|
||||
}
|
||||
|
||||
import { createClient } from '@/lib/supabase/server'
|
||||
|
||||
async function WysiwygDataWrapper() {
|
||||
const products = await getProducts().catch(() => [])
|
||||
const categories = await getCategories().catch(() => [])
|
||||
return <WysiwygAdminClient initialProducts={products} initialCategories={categories} />
|
||||
|
||||
const supabase = await createClient()
|
||||
const { data: allModules } = await supabase
|
||||
.from('product_modules')
|
||||
.select('*')
|
||||
.order('name', { ascending: true })
|
||||
|
||||
return (
|
||||
<WysiwygAdminClient
|
||||
initialProducts={products}
|
||||
initialCategories={categories}
|
||||
allModules={allModules || []}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user