diff --git a/src/app/dashboard/calendario/PublishRrssButton.tsx b/src/app/dashboard/calendario/PublishRrssButton.tsx deleted file mode 100644 index b515850..0000000 --- a/src/app/dashboard/calendario/PublishRrssButton.tsx +++ /dev/null @@ -1,47 +0,0 @@ -'use client'; - -import React, { useState } from 'react'; -import { Upload } from 'lucide-react'; - -export default function PublishRrssButton() { - const [busy, setBusy] = useState(false); - const [msg, setMsg] = useState(null); - - async function publish() { - setBusy(true); - setMsg(null); - try { - const r = await fetch('/api/calendar/publish', { method: 'POST' }); - const j = await r.json(); - if (!r.ok) { - setMsg(j.error || 'Error al publicar'); - return; - } - setMsg(`Publicado · ${j.pieces} piezas · ${j.month}`); - } catch (e) { - setMsg(e instanceof Error ? e.message : 'Error'); - } finally { - setBusy(false); - } - } - - return ( -
- -

- No publica en Instagram ni Facebook. Solo guarda el plan de este mes en - el portal de Agua Miia para que el cliente lo vea en - Calendario. -

- {msg ?

{msg}

: null} -
- ); -} diff --git a/src/app/dashboard/calendario/page.tsx b/src/app/dashboard/calendario/page.tsx index 5446151..6164b74 100644 --- a/src/app/dashboard/calendario/page.tsx +++ b/src/app/dashboard/calendario/page.tsx @@ -6,7 +6,6 @@ import { resolveActiveTenant, restGet } from '@/lib/tenant-context'; import { isAgencyRole, userRole } from '@/lib/agency'; import RrssMonthView, { RrssMonthPlan, RrssPiece } from '@/components/RrssMonthView'; import CalendarClient from './CalendarClient'; -import PublishRrssButton from './PublishRrssButton'; import RrssArchiveYear from '@/components/RrssArchiveYear'; import octPlan from '@/data/rrss-octubre-2026.json'; import { Instagram, Linkedin } from 'lucide-react'; @@ -99,9 +98,6 @@ export default async function CalendarioPage({ plans.push(octPlan as unknown as RrssMonthPlan); } - const canPublishMiia = agency && isAguaMiia; - const publishBtn = canPublishMiia ? : null; - const monthParam = sp.month || plans[0]?.month; const active = plans.find((p) => p.month === monthParam) || plans[0]; // Portada = archivo anual estilo /rrss/ig-fb/ @@ -142,7 +138,6 @@ export default async function CalendarioPage({ > LinkedIn - {publishBtn} ); @@ -156,7 +151,6 @@ export default async function CalendarioPage({ year={year} plans={plans} tenantLabel={ctx.label} - agencyPublish={publishBtn} /> ); } diff --git a/src/components/RrssArchiveYear.tsx b/src/components/RrssArchiveYear.tsx index c969705..f49c828 100644 --- a/src/components/RrssArchiveYear.tsx +++ b/src/components/RrssArchiveYear.tsx @@ -145,12 +145,10 @@ export default function RrssArchiveYear({ year = 2026, plans, tenantLabel, - agencyPublish, }: { year?: number; plans: RrssMonthPlan[]; tenantLabel: string; - agencyPublish?: React.ReactNode; }) { const byMonth = new Map(plans.map((p) => [p.month, p])); const legend = plans[0]?.legend || [ @@ -184,7 +182,6 @@ export default function RrssArchiveYear({ Año {year} · {tenantLabel} × 4Ventures - {agencyPublish}