From 6a7b84989b4b907b150d35b525d2fec2af51103e Mon Sep 17 00:00:00 2001
From: Erik
Date: Sat, 29 Nov 2025 13:03:45 -0300
Subject: [PATCH] feat: make footer badge dynamic from homepage content
---
frontend/src/components/Footer.tsx | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx
index 07ae244..2b10d1f 100644
--- a/frontend/src/components/Footer.tsx
+++ b/frontend/src/components/Footer.tsx
@@ -2,12 +2,17 @@
import Link from 'next/link';
import { useLocale } from '@/contexts/LocaleContext';
+import { usePageContent } from '@/hooks/usePageContent';
export default function Footer() {
const { locale, t } = useLocale();
+ const { content } = usePageContent('home', locale);
// Prefixo para links
const prefix = locale === 'pt' ? '' : `/${locale}`;
+
+ // Badge do hero (dinĂ¢mica)
+ const badge = content?.hero?.badge || { text: 'Coca-Cola', show: true };
return (
-
-
- {t('home.officialProvider')} Coca-Cola
-
+ {badge?.show && (
+
+
+ {t('home.officialProvider')} {badge.text}
+
+ )}