Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

ChatGptSharingControl.tsx

17 lines698 Bytes

1import { usesChatGptSharing } from "@t3tools/shared/usageLimits";
2import type { ServerProvider } from "@t3tools/contracts";
3import { OpenAI } from "../Icons";
4import { ChatGptUsageButton } from "../settings/ChatGptUsageButton";
5​
6export function ChatGptSharingControl({ provider }: { provider: ServerProvider | null }) {
7 if (!usesChatGptSharing(provider)) return null;
8 return (
9 <div className="flex items-center justify-between gap-4 border-t px-3 py-2">
10 <span className="flex items-center gap-2 text-xs text-muted-foreground">
11 <OpenAI className="size-3.5" aria-hidden="true" />
12 Using ChatGPT plan
13 </span>
14 <ChatGptUsageButton size="xs" />
15 </div>
16 );