Skip to content

Commit 4ffd44c

Browse files
feat: Add AI usage banner to chat page
Co-authored-by: joaquim.verges <[email protected]>
1 parent b366d56 commit 4ffd44c

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

apps/nebula/src/app/(app)/components/EmptyStateChatPageContent.tsx

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { ArrowUpRightIcon } from "lucide-react";
3+
import { ArrowUpRightIcon, InfoIcon } from "lucide-react";
44
import { Button } from "@/components/ui/button";
55
import { nebulaAppThirdwebClient } from "@/constants/nebula-client";
66
import { NebulaIcon } from "@/icons/NebulaIcon";
@@ -23,7 +23,8 @@ export function EmptyStateChatPageContent(props: {
2323
onLoginClick: undefined | (() => void);
2424
}) {
2525
return (
26-
<div className="overflow-hidden py-10 lg:py-16">
26+
<div className="relative overflow-hidden py-10 lg:py-16">
27+
<AIUsageBanner />
2728
{props.showAurora && (
2829
<Aurora className="top-0 left-1/2 h-[800px] w-[1000px] text-[hsl(var(--nebula-pink-foreground)/8%)] lg:w-[150%] dark:text-[hsl(var(--nebula-pink-foreground)/10%)]" />
2930
)}
@@ -165,3 +166,37 @@ const Aurora: React.FC<AuroraProps> = ({ className }) => {
165166
/>
166167
);
167168
};
169+
170+
function AIUsageBanner() {
171+
return (
172+
<div className="absolute top-0 left-0 right-0 z-10 flex justify-center px-4 pt-4">
173+
<div className="w-full max-w-4xl">
174+
<div className="relative overflow-hidden rounded-lg border border-blue-200 bg-gradient-to-r from-blue-50 to-blue-50/50 p-3 shadow-sm dark:border-blue-800 dark:from-blue-950/50 dark:to-blue-950/20">
175+
{/* Decorative blur */}
176+
<div className="absolute -right-6 -top-6 size-20 rounded-full bg-blue-600 opacity-10 blur-xl" />
177+
178+
<div className="relative flex items-start gap-3">
179+
<div className="mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900">
180+
<InfoIcon className="size-3.5 text-blue-600 dark:text-blue-400" />
181+
</div>
182+
183+
<div className="flex-1 text-sm">
184+
<p className="text-blue-800 dark:text-blue-200">
185+
thirdweb AI usage is billable based on number of tokens used. For more details, see the{" "}
186+
<a
187+
href="https://thirdweb.com/pricing"
188+
target="_blank"
189+
rel="noopener noreferrer"
190+
className="font-medium text-blue-700 underline decoration-blue-300 underline-offset-2 transition-colors hover:text-blue-800 hover:decoration-blue-500 dark:text-blue-300 dark:decoration-blue-600 dark:hover:text-blue-200 dark:hover:decoration-blue-400"
191+
>
192+
pricing page
193+
</a>
194+
.
195+
</p>
196+
</div>
197+
</div>
198+
</div>
199+
</div>
200+
</div>
201+
);
202+
}

0 commit comments

Comments
 (0)