MCPcopy Create free account
hub / github.com/sqlchat/sqlchat / QuotaOverflowBanner

Function QuotaOverflowBanner

src/components/QuotaOverflowBanner.tsx:11–38  ·  view source on GitHub ↗
(props: Props)

Source from the content-addressed store, hash-verified

9}
10
11const QuotaOverflowBanner = (props: Props) => {
12 const { className } = props;
13 const { t } = useTranslation();
14 const [hideBanner, setHideBanner] = useLocalStorage("hide-quota-overflow-banner", false);
15 const show = !hideBanner;
16
17 return (
18 <>
19 <div
20 className={`${!show && "!hidden"} ${
21 className || ""
22 } relative w-full flex flex-row justify-start sm:justify-center items-center px-4 py-1 bg-gray-100 dark:bg-zinc-700`}
23 >
24 <div className="text-sm leading-6 pr-4 cursor-pointer">
25 {t("banner.quota-overflow")}{" "}
26 {allowSelfOpenAIKey() && (
27 <Link className="ml-1 underline hover:opacity-80" href="/setting">
28 {t("banner.use-my-key")}
29 </Link>
30 )}
31 </div>
32 <button className="absolute right-2 sm:right-4 opacity-60 hover:opacity-100" onClick={() => setHideBanner(true)}>
33 <Icon.BiX className="w-6 h-auto" />
34 </button>
35 </div>
36 </>
37 );
38};
39
40export default QuotaOverflowBanner;

Callers

nothing calls this directly

Calls 1

allowSelfOpenAIKeyFunction · 0.90

Tested by

no test coverage detected