fix: syntax error in DashboardCoach

This commit is contained in:
Marcio Bevervanso 2026-02-17 19:13:20 -03:00
parent 62a509d8a6
commit 5758504d4e

View file

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { Sparkles, Zap, ScanLine, ScanEye, BrainCircuit, TrendingUp, History, Plus, Activity } from 'lucide-react'; import { Sparkles, Zap, ScanLine, ScanEye, BrainCircuit, TrendingUp, Plus, Activity, ShieldAlert } from 'lucide-react';
import CoachResult from '@/components/coach/CoachResult'; import CoachResult from '@/components/coach/CoachResult';
interface DashboardCoachProps { interface DashboardCoachProps {
@ -21,7 +21,6 @@ const DashboardCoach: React.FC<DashboardCoachProps> = ({ coachPlan, setCoachPlan
return ( return (
<div className="max-w-6xl mx-auto animate-in fade-in slide-in-from-bottom-8 duration-700"> <div className="max-w-6xl mx-auto animate-in fade-in slide-in-from-bottom-8 duration-700">
{/* Sleek Modern Header */} {/* Sleek Modern Header */}
<div className="bg-gray-900 rounded-[2rem] p-8 md:p-12 mb-8 relative overflow-hidden text-white shadow-2xl"> <div className="bg-gray-900 rounded-[2rem] p-8 md:p-12 mb-8 relative overflow-hidden text-white shadow-2xl">
{/* Abstract Premium Background */} {/* Abstract Premium Background */}
@ -121,7 +120,7 @@ const DashboardCoach: React.FC<DashboardCoachProps> = ({ coachPlan, setCoachPlan
].map((stat, i) => ( ].map((stat, i) => (
<div key={i} className="text-center p-6 bg-white rounded-3xl border border-gray-200 shadow-sm hover:shadow-md transition-shadow"> <div key={i} className="text-center p-6 bg-white rounded-3xl border border-gray-200 shadow-sm hover:shadow-md transition-shadow">
<p className="text-3xl font-black text-gray-900 mb-1">{stat.value}</p> <p className="text-3xl font-black text-gray-900 mb-1">{stat.value}</p>
<p className="text-xs font-bold text-gray-400 uppercase tracking-wider}>{stat.label}</p> <p className="text-xs font-bold text-gray-400 uppercase tracking-wider">{stat.label}</p>
</div> </div>
))} ))}
</div> </div>
@ -137,68 +136,64 @@ const DashboardCoach: React.FC<DashboardCoachProps> = ({ coachPlan, setCoachPlan
// 🔒 FREE PLAN LOCK // 🔒 FREE PLAN LOCK
if (!isPaid) { if (!isPaid) {
return ( return (
<div className="w-full animate-in fade-in duration-500"> <div className="w-full animate-in fade-in duration-500">
<div className="bg-gray-900 rounded-3xl border border-gray-800 p-12 text-center h-[500px] flex flex-col items-center justify-center relative overflow-hidden group"> <div className="bg-gray-900 rounded-3xl border border-gray-800 p-12 text-center h-[500px] flex flex-col items-center justify-center relative overflow-hidden group">
<div className="absolute inset-0 bg-brand-900/10"></div> <div className="absolute inset-0 bg-brand-900/10"></div>
<div className="absolute top-0 right-0 w-[500px] h-[500px] bg-brand-900/20 rounded-full blur-[120px] translate-x-1/2 -translate-y-1/2"></div> <div className="absolute top-0 right-0 w-[500px] h-[500px] bg-brand-900/20 rounded-full blur-[120px] translate-x-1/2 -translate-y-1/2"></div>
<div className="relative z-10 flex flex-col items-center"> <div className="relative z-10 flex flex-col items-center">
<div className="w-20 h-20 bg-gray-800/50 rounded-full flex items-center justify-center mb-6 group-hover:scale-110 transition-transform duration-300 border border-white/10"> <div className="w-20 h-20 bg-gray-800/50 rounded-full flex items-center justify-center mb-6 group-hover:scale-110 transition-transform duration-300 border border-white/10">
<ShieldAlert size={40} className="text-brand-500" /> <ShieldAlert size={40} className="text-brand-500" />
</div>
<h3 className="text-2xl font-bold text-white mb-3">Funcionalidade PRO</h3>
<p className="text-gray-400 max-w-md mx-auto mb-8 text-lg">
O Personal IA está disponível apenas para membros PRO. Desbloqueie todo o potencial do seu corpo agora.
</p>
<button
onClick={() => {
// Reduz o active tab para subscription se possível, mas aqui estamos isolados.
// Idealmente chamaria uma função do pai ou link direto pro checkout.
// Vamos despachar um evento ou alertar por enquanto, ou usar href para dashboard?
// Melhor: window.location.href com query param ou apenas instruir.
const subTab = document.querySelector('[data-tab="subscription"]') as HTMLElement;
if (subTab) subTab.click();
else window.location.reload(); // Simplificação
}}
className="px-8 py-3.5 bg-brand-600 hover:bg-brand-500 text-white rounded-xl font-bold flex items-center gap-2 transition-all shadow-lg hover:shadow-brand-500/20"
>
<Zap size={20} fill="currentColor" />
Fazer Upgrade Agora
</button>
</div>
</div>
</div> </div>
); <h3 className="text-2xl font-bold text-white mb-3">Funcionalidade PRO</h3>
<p className="text-gray-400 max-w-md mx-auto mb-8 text-lg">
O Personal IA está disponível apenas para membros PRO. Desbloqueie todo o potencial do seu corpo agora.
</p>
<button
onClick={() => {
// Reduz o active tab para subscription se possível, mas aqui estamos isolados.
const subTab = document.querySelector('[data-tab="subscription"]') as HTMLElement;
if (subTab) subTab.click();
else window.location.reload();
}}
className="px-8 py-3.5 bg-brand-600 hover:bg-brand-500 text-white rounded-xl font-bold flex items-center gap-2 transition-all shadow-lg hover:shadow-brand-500/20"
>
<Zap size={20} fill="currentColor" />
Fazer Upgrade Agora
</button>
</div>
</div>
</div>
);
} }
return (
<div className="w-full animate-in fade-in duration-500">
{coachPlan ? (
<CoachResult data={coachPlan} onReset={() => setCoachPlan(null)} />
) : (
<div className="bg-white rounded-3xl border border-gray-100 p-12 text-center h-[500px] flex flex-col items-center justify-center relative overflow-hidden group">
return ( <div className="w-16 h-16 bg-brand-50 rounded-full flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300">
<div className="w-full animate-in fade-in duration-500"> <Activity size={32} className="text-brand-500" />
{coachPlan ? (
<CoachResult data={coachPlan} onReset={() => setCoachPlan(null)} />
) : (
<div className="bg-white rounded-3xl border border-gray-100 p-12 text-center h-[500px] flex flex-col items-center justify-center relative overflow-hidden group">
<div className="w-16 h-16 bg-brand-50 rounded-full flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300">
<Activity size={32} className="text-brand-500" />
</div>
<h3 className="text-lg font-bold text-gray-900 mb-2">Selecione uma análise</h3>
<p className="text-gray-500 max-w-sm mx-auto mb-8">
Escolha um protocolo no menu lateral ("Coach AI → Histórico") ou gere um novo para transformar seus resultados.
</p>
<button
onClick={() => setIsCoachWizardOpen(true)}
className="px-8 py-3 bg-brand-600 hover:bg-brand-500 text-white rounded-xl font-bold flex items-center gap-2 transition-all shadow-lg shadow-brand-200 hover:shadow-brand-300 transform hover:-translate-y-0.5"
>
<Plus size={20} />
Nova Análise com IA
</button>
</div>
)}
</div> </div>
); <h3 className="text-lg font-bold text-gray-900 mb-2">Selecione uma análise</h3>
<p className="text-gray-500 max-w-sm mx-auto mb-8">
Escolha um protocolo no menu lateral ("Coach AI → Histórico") ou gere um novo para transformar seus resultados.
</p>
<button
onClick={() => setIsCoachWizardOpen(true)}
className="px-8 py-3 bg-brand-600 hover:bg-brand-500 text-white rounded-xl font-bold flex items-center gap-2 transition-all shadow-lg shadow-brand-200 hover:shadow-brand-300 transform hover:-translate-y-0.5"
>
<Plus size={20} />
Nova Análise com IA
</button>
</div>
)}
</div>
);
}; };
export default DashboardCoach; export default DashboardCoach;