The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { T } from "gt-react"; |
| 2 | import type { ComponentProps } from "react"; |
| 3 | import { ExternalLinkIcon } from "lucide-react"; |
| 4 | import { CHATGPT_USAGE_URL } from "@t3tools/shared/usageLimits"; |
| 5 | import { ensureLocalApi } from "../../localApi"; |
| 6 | import { Button } from "../ui/button"; |
| 7 | |
| 8 | export function ChatGptUsageButton(props: Omit<ComponentProps<typeof Button>, "onClick">) { |
| 9 | return ( |
| 10 | <Button |
| 11 | variant="ghost-muted" |
| 12 | size="sm" |
| 13 | {...props} |
| 14 | onClick={() => void ensureLocalApi().shell.openExternal(CHATGPT_USAGE_URL)} |
| 15 | > |
| 16 | <T>Manage usage</T> |
| 17 | <ExternalLinkIcon className="size-3.5" aria-hidden="true" /> |
| 18 | </Button> |
| 19 | ); |
| 20 | } |