feat(admin): add wysiwyg editor for order wizard
All checks were successful
Staging Build / build (push) Successful in 2m49s
All checks were successful
Staging Build / build (push) Successful in 2m49s
This commit is contained in:
33
shop/app/admin/wysiwyg/page.tsx
Normal file
33
shop/app/admin/wysiwyg/page.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { getProducts, getCategories } from '@/lib/actions/products'
|
||||
import { WysiwygAdminClient } from './wysiwyg-client'
|
||||
import { Edit, Sparkles } from 'lucide-react'
|
||||
import { Suspense } from 'react'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export default async function WysiwygAdminPage() {
|
||||
return (
|
||||
<div className="flex-1 space-y-8 p-8 pt-6">
|
||||
<div className="flex items-center justify-between space-y-2">
|
||||
<div>
|
||||
<h2 className="text-3xl font-bold tracking-tight text-gradient flex items-center gap-3">
|
||||
<Edit className="w-8 h-8 text-primary" />
|
||||
WYSIWYG Live-Editor
|
||||
</h2>
|
||||
<p className="text-slate-300">
|
||||
Kategorien und Produkte visuell im Wizard-Layout bearbeiten.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<Suspense fallback={<div className="h-40 w-full animate-pulse bg-white/5 rounded-xl" />}>
|
||||
<WysiwygDataWrapper />
|
||||
</Suspense>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
async function WysiwygDataWrapper() {
|
||||
const products = await getProducts().catch(() => [])
|
||||
const categories = await getCategories().catch(() => [])
|
||||
return <WysiwygAdminClient initialProducts={products} initialCategories={categories} />
|
||||
}
|
||||
Reference in New Issue
Block a user