feat(F-064): completed feature
This commit is contained in:
@@ -6,6 +6,7 @@ import { productsApi, brandsApi, categoriesApi } from '@/lib/api-client';
|
||||
import { ImagesSection } from './sections/ImagesSection';
|
||||
import { InventorySection } from './sections/InventorySection';
|
||||
import { PricingSection } from './sections/PricingSection';
|
||||
import LexicalEditor from '@/features/cms/components/LexicalEditor';
|
||||
|
||||
interface ProductEditorProps {
|
||||
productId?: string;
|
||||
@@ -237,9 +238,11 @@ export function ProductEditor({ productId }: ProductEditorProps) {
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-semibold text-gray-900 mb-1.5">Descripción</label>
|
||||
<textarea value={desc} onChange={e => setDesc(e.target.value)} rows={4}
|
||||
placeholder="Descripción detallada del producto..."
|
||||
className="w-full px-4 py-2.5 border border-gray-300 rounded-xl text-sm focus:ring-2 focus:ring-[#2D6A4F] outline-none resize-none" />
|
||||
<LexicalEditor
|
||||
value={desc}
|
||||
onChange={(html) => setDesc(html)}
|
||||
placeholder="Descripción detallada del producto…"
|
||||
/>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-5">
|
||||
<div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -193,7 +193,10 @@ export default async function ProductPage({ params }: Props) {
|
||||
{product.description && (
|
||||
<div className="mt-8">
|
||||
<h2 className="text-lg font-semibold text-gray-900 mb-2">Descripción</h2>
|
||||
<p className="text-gray-600 leading-relaxed">{product.description}</p>
|
||||
<div
|
||||
className="text-gray-600 leading-relaxed prose prose-sm max-w-none"
|
||||
dangerouslySetInnerHTML={{ __html: product.description }}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -85,7 +85,11 @@ export default async function ProductPage({ params }: PageProps) {
|
||||
{product.name}
|
||||
</h1>
|
||||
<p className="text-lg leading-8 text-stone-700">
|
||||
{product.description ?? 'Producto del catálogo público de mercadodevida.'}
|
||||
{product.description ? (
|
||||
<span dangerouslySetInnerHTML={{ __html: product.description }} />
|
||||
) : (
|
||||
'Producto del catálogo público de mercadodevida.'
|
||||
)}
|
||||
</p>
|
||||
<dl className="grid gap-4 rounded-3xl border border-emerald-900/10 bg-white p-6 text-sm text-stone-700 sm:grid-cols-2">
|
||||
<div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user