/** * WelcomeHeader Component * * Displays a personalized welcome message for the dashboard. * * @see Issue #53 */ 'use client'; import { Plus } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Link } from '@/lib/i18n/routing'; import { useAuth } from '@/lib/auth/AuthContext'; export interface WelcomeHeaderProps { /** Additional CSS classes */ className?: string; } export function WelcomeHeader({ className }: WelcomeHeaderProps) { const { user } = useAuth(); // Get first name for greeting const firstName = user?.first_name || user?.email?.split('@')[0] || 'there'; // Get time-based greeting const getGreeting = () => { const hour = new Date().getHours(); if (hour < 12) return 'Good morning'; if (hour < 18) return 'Good afternoon'; return 'Good evening'; }; return (
Here's what's happening with your projects today.