import { useAuth } from "@/hooks/use-auth"; import { useQuery } from "@tanstack/react-query"; import { Link, useLocation } from "wouter"; import { LogIn, LogOut, Telescope, CreditCard, HelpCircle } from "lucide-react"; export function Header() { const { user, isLoading, isAuthenticated } = useAuth(); const [location] = useLocation(); const { data: creditsData } = useQuery<{ credits: number; freeUsesRemaining: number; totalAnalyses: number; }>({ queryKey: ["/api/credits"], enabled: isAuthenticated, }); const navItems = [ { path: "/pricing", label: "Pricing", icon: CreditCard }, { path: "/help", label: "Help", icon: HelpCircle }, ]; return (