From 444c867ae8b3893ffc3d97e6a45c40ad18beb316 Mon Sep 17 00:00:00 2001 From: Sidney Gomes Date: Wed, 22 Jul 2026 21:06:06 -0300 Subject: [PATCH] fix(ui): CoursePricingCard state sync and Navbar text truncation --- src/components/AdminPricingManager.tsx | 5 +++++ src/components/Navbar.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/AdminPricingManager.tsx b/src/components/AdminPricingManager.tsx index 41071b1..962f218 100644 --- a/src/components/AdminPricingManager.tsx +++ b/src/components/AdminPricingManager.tsx @@ -11,6 +11,11 @@ function CoursePricingCard({ course, saveLoading, onSave }: { course: Course, sa const [localPrice, setLocalPrice] = useState(course.price || 0); const [localLocked, setLocalLocked] = useState(course.isLocked || false); + useEffect(() => { + setLocalPrice(course.price || 0); + setLocalLocked(course.isLocked || false); + }, [course.price, course.isLocked]); + const isChanged = localPrice !== (course.price || 0) || localLocked !== (course.isLocked || false); return ( diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 1dea00f..3328e19 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -134,7 +134,7 @@ export default function Navbar({ user, activeView, setView, onLogout }: NavbarPr className={`font-semibold transition-colors hover:text-[#E50914] flex items-center space-x-1.5 whitespace-nowrap flex-shrink-0 ${activeView === 'certificates' ? 'text-white' : 'text-zinc-400'}`} > - Meu Certificado + Meus Certificados