diff --git a/src/components/editor/Editor.tsx b/src/components/editor/Editor.tsx index 97a3a66..8e22bb8 100644 --- a/src/components/editor/Editor.tsx +++ b/src/components/editor/Editor.tsx @@ -5,14 +5,13 @@ import { useTranslations } from 'next-intl'; import type { EditorData, EditorSection } from './types'; import LanguageSwitch from '@/components/LanguageSwitch'; import CatalogTab from './CatalogTab'; -import PaletteTab from './PaletteTab'; import BrandTab from './BrandTab'; import OrdersTab from './OrdersTab'; import QrTab from './QrTab'; import PublishModal from './PublishModal'; -import { ClipboardList, Palette, Store, Bell, QrCode, type LucideIcon } from 'lucide-react'; +import { ClipboardList, Store, Bell, QrCode, type LucideIcon } from 'lucide-react'; -type Tab = 'catalog' | 'palette' | 'brand' | 'orders' | 'qr'; +type Tab = 'catalog' | 'brand' | 'orders' | 'qr'; export default function Editor({ data, baseUrl }: { data: EditorData; baseUrl: string }) { const t = useTranslations('editor'); @@ -26,7 +25,6 @@ export default function Editor({ data, baseUrl }: { data: EditorData; baseUrl: s const tabs: { id: Tab; label: string; Icon: LucideIcon }[] = [ { id: 'catalog', label: t('catalog'), Icon: ClipboardList }, - { id: 'palette', label: t('palette'), Icon: Palette }, { id: 'brand', label: t('brand'), Icon: Store }, { id: 'orders', label: t('orders'), Icon: Bell }, { id: 'qr', label: t('qr'), Icon: QrCode }, @@ -56,7 +54,6 @@ export default function Editor({ data, baseUrl }: { data: EditorData; baseUrl: s onRestored={(name) => setPublishedName(name)} /> )} - {tab === 'palette' && } {tab === 'brand' && ( ({ - ...PALETTE_PRESETS[0].palette, - ...initialPalette, - }); - const [saving, setSaving] = useState(false); - const [saved, setSaved] = useState(false); - - function update(next: Palette) { - setPalette(next); - setSaved(false); - } - - async function save() { - setSaving(true); - try { - await api(slug, '/palette', { method: 'PATCH', json: { palette } }); - setSaved(true); - } finally { - setSaving(false); - } - } - - return ( -
- {/* Live preview */} -
-
-

- Vista previa -

- -
-
- - {/* Presets */} -
- {PALETTE_PRESETS.map((p) => ( - - ))} -
- - {/* Custom colors */} -
-
- {FIELDS.map((f) => ( - - ))} -
-
- -

⚠️ {t('paletteHint')}

- - -
- ); -}