import { useMemo } from "react"; import { AI_HELP } from "../../telemetry/constants"; import { Icon } from "../../ui/atoms/icon"; import { SignUpLink } from "../../ui/atoms/signup-link"; import { useUserData } from "../../user-context"; import { PlusLoginBanner } from "../common/login-banner"; import { isPlusSubscriber } from "../../utils"; export function AiHelpBanner({ isDisabled = false, }: { isDisabled?: boolean } = {}) { const user = useUserData(); const isSubscriber = useMemo(() => isPlusSubscriber(user), [user]); return (
{isSubscriber ? "Now with chat history, enhanced context, and optimized prompts." : "Upgrade to MDN Plus 5 or Supporter 10 to unlock the full potential of GPT-4o-powered AI Help."}
{!isSubscriber && (