diff --git a/components/mobile/HeaderBar.tsx b/components/mobile/HeaderBar.tsx new file mode 100644 index 0000000..903ff66 --- /dev/null +++ b/components/mobile/HeaderBar.tsx @@ -0,0 +1,72 @@ +'use client'; + +/* HeaderBar — phase 02 (SHELL-02..04). + * + * Sticky top bar inside the /mobile shell. Three slots: + * left: WulfMark + "Pulse" wordmark, linked to /mobile/dashboard + * right: Bell icon button (placeholder, aria-label="Notifications") + * right: compact avatar circle — opens the More drawer (parent owns state) + * + * No page title in the header — pages render their own H1. */ + +import Link from 'next/link'; +import { Bell } from 'lucide-react'; +import { WulfMark } from '@/components/branding/wulf-mark'; +import { useSession } from '@/lib/auth-client'; + +interface HeaderBarProps { + onAvatarClick: () => void; +} + +export function HeaderBar({ onAvatarClick }: HeaderBarProps) { + const { data: session } = useSession(); + const user = session?.user as + | { name?: string; email?: string } + | undefined; + + const initials = (user?.name ?? user?.email ?? '?') + .split(/[\s@]/) + .filter(Boolean) + .slice(0, 2) + .map((p) => p[0]?.toUpperCase()) + .join(''); + + return ( +
+
+ {/* Left: brand mark + wordmark, linked to /mobile/dashboard */} + + + Pulse + + + {/* Right: Bell placeholder, then avatar trigger */} +
+ + + +
+
+
+ ); +}