diff --git a/src/components/app-shell.tsx b/src/components/app-shell.tsx
index 5061872..0e28d99 100644
--- a/src/components/app-shell.tsx
+++ b/src/components/app-shell.tsx
@@ -1,29 +1,54 @@
import { Link, useLocation, useNavigate } from "@tanstack/react-router";
import { useAuth } from "@/lib/auth";
import { Button } from "@/components/ui/button";
-import { Briefcase, Users, FileText, Receipt, ShieldCheck, LogOut, Scale, LayoutDashboard } from "lucide-react";
+import {
+ Briefcase,
+ Users,
+ Receipt,
+ ShieldCheck,
+ LogOut,
+ Scale,
+ LayoutDashboard,
+ CheckSquare,
+ MessageSquare,
+} from "lucide-react";
import { cn } from "@/lib/utils";
import type { ReactNode } from "react";
+import { useBubbleCounts } from "@/lib/use-bubble-counts";
+import { NotificationBell } from "@/components/notifications/notification-bell";
interface NavItem {
to: string;
label: string;
icon: typeof Briefcase;
adminOnly?: boolean;
+ bubbleKey?: "messages" | "tasks";
}
const NAV: NavItem[] = [
{ to: "/", label: "Dashboard", icon: LayoutDashboard },
{ to: "/clients", label: "Clients", icon: Users },
{ to: "/cases", label: "Cases", icon: Briefcase },
+ { to: "/tasks", label: "Tasks", icon: CheckSquare, bubbleKey: "tasks" },
+ { to: "/messages", label: "Messages", icon: MessageSquare, bubbleKey: "messages" },
{ to: "/invoices", label: "Invoices", icon: Receipt },
{ to: "/admin/users", label: "Users", icon: ShieldCheck, adminOnly: true },
];
+function Bubble({ count }: { count: number }) {
+ if (!count) return null;
+ return (
+
+ {count > 99 ? "99+" : count}
+
+ );
+}
+
export function AppShell({ children }: { children: ReactNode }) {
const { user, signOut, isAdmin, roles } = useAuth();
const location = useLocation();
const navigate = useNavigate();
+ const counts = useBubbleCounts();
const handleSignOut = async () => {
await signOut();
@@ -38,16 +63,18 @@ export function AppShell({ children }: { children: ReactNode }) {
-
-
Stage Law Firm, PLLC
+
+
Stage Law Firm, PLLC
Law Firm Suite
+