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:
@@ -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>
|
||||
);
|
||||
|
Reference in New Issue
Block a user