mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
Unifica a estrutura da navbar entre o app e a landing page via novo componente NavbarShell. Centraliza estilos de botões da navbar na variante `navbar` do Button, eliminando nav-styles.ts e as classes inline duplicadas. AnimatedThemeToggler, RefreshPageButton e MobileNav passam a aceitar prop `variant` para adaptar ao contexto. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
import { AnimatedThemeToggler } from "@/shared/components/animated-theme-toggler";
|
|
import { NotificationBell } from "@/shared/components/navigation/navbar/notification-bell";
|
|
import { RefreshPageButton } from "@/shared/components/refresh-page-button";
|
|
import type { DashboardNotificationsSnapshot } from "@/shared/lib/types/notifications";
|
|
import { NavMenu } from "./nav-menu";
|
|
import { NavbarShell } from "./navbar-shell";
|
|
import { NavbarUser } from "./navbar-user";
|
|
|
|
type AppNavbarProps = {
|
|
user: {
|
|
id: string;
|
|
name: string;
|
|
email: string;
|
|
image: string | null;
|
|
};
|
|
pagadorAvatarUrl: string | null;
|
|
preLancamentosCount?: number;
|
|
notificationsSnapshot: DashboardNotificationsSnapshot;
|
|
};
|
|
|
|
export function AppNavbar({
|
|
user,
|
|
pagadorAvatarUrl,
|
|
preLancamentosCount = 0,
|
|
notificationsSnapshot,
|
|
}: AppNavbarProps) {
|
|
return (
|
|
<NavbarShell logoHref="/dashboard" fixed>
|
|
<NavMenu />
|
|
<div className="ml-auto flex items-center gap-2">
|
|
<NotificationBell
|
|
notifications={notificationsSnapshot.notifications}
|
|
unreadCount={notificationsSnapshot.unreadCount}
|
|
visibleCount={notificationsSnapshot.visibleCount}
|
|
budgetNotifications={notificationsSnapshot.budgetNotifications}
|
|
preLancamentosCount={preLancamentosCount}
|
|
/>
|
|
<RefreshPageButton variant="navbar" />
|
|
<AnimatedThemeToggler variant="navbar" />
|
|
</div>
|
|
<NavbarUser user={user} pagadorAvatarUrl={pagadorAvatarUrl} />
|
|
</NavbarShell>
|
|
);
|
|
}
|