-
- {/* Logo e Descrição */}
-
-
-

-
- Eternizando momentos únicos com excelência e
- profissionalismo desde 2020.
-
-
-
+// Componente Home com roteamento
+const HomeWithRouter: React.FC = () => {
+ const navigate = useNavigate();
+ const { user } = useAuth();
+
+ return (
+
+ navigate(user ? "/painel" : "/entrar")} />
+
+
+ );
+};
- {/* Serviços */}
-
-
- Serviços
-
-
- - Fotografia de Formatura
- - Cerimônia de Colação
- - Ensaios de Turma
-
-
+// Componente de Login com redirecionamento
+const LoginWithRouter: React.FC = () => {
+ const navigate = useNavigate();
+ const { user } = useAuth();
- {/* Links Úteis */}
-
+ if (user) {
+ return
;
+ }
- {/* Contato */}
-
-
+ return (
+
+ navigate(`/${page}`)} />
+
+ );
+};
- {/* Bottom Bar */}
-
-
© 2025 PhotumFormaturas. Todos os direitos reservados.
-
+// Componente de Registro com redirecionamento
+const RegisterWithRouter: React.FC = () => {
+ const navigate = useNavigate();
+ const { user } = useAuth();
+
+ if (user) {
+ return
;
+ }
+
+ return (
+
+ navigate(`/${page}`)} />
+
+ );
+};
+
+// Footer component
+const Footer: React.FC = () => {
+ const navigate = useNavigate();
+
+ return (
+
+
+ );
+};
+
+const AppContent: React.FC = () => {
+ const location = useLocation();
+ const showFooter = location.pathname === "/";
+
+ return (
+ <>
+
+ {/* Rotas Públicas */}
+ } />
+ } />
+ } />
+
+ window.location.href = `/${page}`} />
+
+ }
+ />
+
+ window.location.href = `/${page}`} />
+
+ }
+ />
+
+ window.location.href = `/${page}`} />
+
+ }
+ />
+
+ {/* Rotas Protegidas - Todos os usuários autenticados */}
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+ }
+ />
+
+ {/* Rota de solicitação de evento - Clientes e Administradores */}
+
+
+
+
+
+ }
+ />
+
+ {/* Rotas Administrativas - Apenas gestão */}
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+ }
+ />
+
+ {/* Rota padrão - redireciona para home */}
+ } />
+
+ >
);
};
function App() {
return (
-
-
-
-
-
+
+
+
+
+
+
+
);
}
diff --git a/frontend/components/Navbar.tsx b/frontend/components/Navbar.tsx
index 4a5206e..adb5c39 100644
--- a/frontend/components/Navbar.tsx
+++ b/frontend/components/Navbar.tsx
@@ -60,18 +60,18 @@ export const Navbar: React.FC
= ({ onNavigate, currentPage }) => {
case UserRole.SUPERADMIN:
case UserRole.BUSINESS_OWNER:
return [
- { name: "Gestão de Eventos", path: "dashboard" },
- { name: "Equipe", path: "team" },
- { name: "Gestão de Cursos", path: "courses" },
- { name: "Financeiro", path: "finance" },
+ { name: "Gestão de Eventos", path: "painel" },
+ { name: "Equipe", path: "equipe" },
+ { name: "Gestão de Cursos", path: "cursos" },
+ { name: "Financeiro", path: "financeiro" },
];
case UserRole.EVENT_OWNER:
return [
- { name: "Meus Eventos", path: "dashboard" },
- { name: "Solicitar Evento", path: "request-event" },
+ { name: "Meus Eventos", path: "painel" },
+ { name: "Solicitar Evento", path: "solicitar-evento" },
];
case UserRole.PHOTOGRAPHER:
- return [{ name: "Eventos Designados", path: "dashboard" }];
+ return [{ name: "Eventos Designados", path: "painel" }];
default:
return [];
}
@@ -287,7 +287,7 @@ export const Navbar: React.FC = ({ onNavigate, currentPage }) => {