diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 5bb3324..fdf4c47 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -2,10 +2,11 @@ import Image from "next/image"; import Link from "next/link"; -import { - ShieldCheckIcon, - TruckIcon, - ChartBarIcon, +import { useAuth } from "@/context/AuthContext"; +import { + ShieldCheckIcon, + TruckIcon, + ChartBarIcon, UserGroupIcon, CheckCircleIcon, ArrowRightIcon, @@ -18,6 +19,7 @@ import { * Apresenta informações sobre o projeto e opções de login/cadastro */ const HomePage = () => { + const { user, loading } = useAuth(); return (
@@ -45,18 +47,29 @@ const HomePage = () => { > FAQ - - Entrar - - - Cadastrar-se - + {!loading && user ? ( + + Dashboard + + ) : ( + <> + + Entrar + + + Cadastrar-se + + + )}
@@ -68,33 +81,33 @@ const HomePage = () => {
- +
- + {/* Main Headline */}

Marketplace para - Farmácias + Farmácias

- + {/* Subtitle */}

- A plataforma inteligente que conecta farmácias, + A plataforma inteligente que conecta farmácias, otimizando compras, vendas e gestão de medicamentos com segurança e eficiência.

- + {/* CTA Buttons */}
- Começar Agora + {!loading && user ? "Ir para Dashboard" : "Começar Agora"}
- + {/* Social Proof */}
@@ -131,7 +144,7 @@ const HomePage = () => { Por que escolher o SaveInMed?

- Nossa plataforma oferece soluções completas para modernizar e otimizar + Nossa plataforma oferece soluções completas para modernizar e otimizar sua operação no setor de saúde.

@@ -193,10 +206,10 @@ const HomePage = () => { Transforme sua operação com tecnologia

- O SaveInMed oferece uma solução completa para farmácias e hospitais + O SaveInMed oferece uma solução completa para farmácias e hospitais modernizarem suas operações e aumentarem sua eficiência.

- +
@@ -205,7 +218,7 @@ const HomePage = () => {

Controle automático de estoque com alertas de reposição.

- +
@@ -213,7 +226,7 @@ const HomePage = () => {

Compare preços e encontre os melhores fornecedores.

- +
@@ -226,82 +239,82 @@ const HomePage = () => {
- {/* Subtle background pattern */} -
+ {/* Subtle background pattern */} +
-
-
-

Resultados Comprovados

-

Métricas reais que mostram o impacto do SaveInMed

-
- -
-
{ if (e.key === "Enter" || e.key === " ") (e.currentTarget as HTMLElement).click(); }} - className="text-center p-4 rounded-xl bg-red-50 border border-red-200 hover:shadow-md transition-all cursor-pointer focus:outline-none focus:ring-2 focus:ring-red-200" - title="500+ farmácias conectadas" - > -
- +
+
+

Resultados Comprovados

+

Métricas reais que mostram o impacto do SaveInMed

-
500+
-
Farmácias Conectadas
-
-
{ if (e.key === "Enter" || e.key === " ") (e.currentTarget as HTMLElement).click(); }} - className="text-center p-4 rounded-xl bg-emerald-50 border border-emerald-200 hover:shadow-md transition-all cursor-pointer focus:outline-none focus:ring-2 focus:ring-emerald-200" - title="R$ 10M+ em transações" - > -
- -
-
R$ 10M+
-
Em Transações
-
+
+
{ if (e.key === "Enter" || e.key === " ") (e.currentTarget as HTMLElement).click(); }} + className="text-center p-4 rounded-xl bg-red-50 border border-red-200 hover:shadow-md transition-all cursor-pointer focus:outline-none focus:ring-2 focus:ring-red-200" + title="500+ farmácias conectadas" + > +
+ +
+
500+
+
Farmácias Conectadas
+
-
{ if (e.key === "Enter" || e.key === " ") (e.currentTarget as HTMLElement).click(); }} - className="text-center p-4 rounded-xl bg-indigo-50 border border-indigo-200 hover:shadow-md transition-all cursor-pointer focus:outline-none focus:ring-2 focus:ring-indigo-200" - title="1000+ entregas realizadas" - > -
- -
-
1000+
-
Entregas Realizadas
-
+
{ if (e.key === "Enter" || e.key === " ") (e.currentTarget as HTMLElement).click(); }} + className="text-center p-4 rounded-xl bg-emerald-50 border border-emerald-200 hover:shadow-md transition-all cursor-pointer focus:outline-none focus:ring-2 focus:ring-emerald-200" + title="R$ 10M+ em transações" + > +
+ +
+
R$ 10M+
+
Em Transações
+
-
{ if (e.key === "Enter" || e.key === " ") (e.currentTarget as HTMLElement).click(); }} - className="text-center p-4 rounded-xl bg-blue-50 border border-blue-200 hover:shadow-md transition-all cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-200" - title="Suporte 24/7" - > -
- +
{ if (e.key === "Enter" || e.key === " ") (e.currentTarget as HTMLElement).click(); }} + className="text-center p-4 rounded-xl bg-indigo-50 border border-indigo-200 hover:shadow-md transition-all cursor-pointer focus:outline-none focus:ring-2 focus:ring-indigo-200" + title="1000+ entregas realizadas" + > +
+ +
+
1000+
+
Entregas Realizadas
+
+ +
{ if (e.key === "Enter" || e.key === " ") (e.currentTarget as HTMLElement).click(); }} + className="text-center p-4 rounded-xl bg-blue-50 border border-blue-200 hover:shadow-md transition-all cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-200" + title="Suporte 24/7" + > +
+ +
+
24/7
+
Suporte Disponível
+
-
24/7
-
Suporte Disponível
-
-
- + {/* Footer */}
@@ -319,11 +332,11 @@ const HomePage = () => { SaveInMed

- Marketplace B2B para farmácias e hospitais. Conectando o setor de saúde + Marketplace B2B para farmácias e hospitais. Conectando o setor de saúde através de tecnologia inovadora.

- +

Suporte

    @@ -332,7 +345,7 @@ const HomePage = () => {
- +

© {new Date().getFullYear()} SaveInMed. Todos os direitos reservados.