1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-09-03 06:12:53 +02:00

Chat history UI

This commit is contained in:
Kamran Ahmed
2025-06-11 14:45:20 +01:00
parent b177b0a6e4
commit ab888e8f73

View File

@@ -61,17 +61,21 @@ export function AIChatHistory(props: AIChatHistoryProps) {
setIsChatHistoryLoading(false);
}, [hasError]);
if (isLoading || isBillingDetailsLoading) {
return (
<AIChatLayout>
<div className="relative flex grow">
{showGlobalLoader && (
<div className="absolute inset-0 z-20 flex items-center justify-center">
<Loader2Icon className="h-8 w-8 animate-spin stroke-[2.5]" />
<Loader2Icon className="h-8 w-8 animate-spin stroke-[2.5] text-gray-400/80" />
</div>
)}
</div>
</AIChatLayout>
);
}
{!showGlobalLoader && (
<>
return (
<AIChatLayout>
<div className="relative flex grow">
{isPaidUser && (
<ListChatHistory
activeChatHistoryId={chatHistoryId}
@@ -144,8 +148,6 @@ export function AIChatHistory(props: AIChatHistoryProps) {
/>
)}
</div>
</>
)}
</div>
</AIChatLayout>
);