4ac0754ea7
Extract logic from god components into custom hooks (useAuthCheck, useConversations, useChat, usePresignedUrl, useAdminUsers, useOIDCAuth). Eliminate unnecessary useEffects per React guidelines — scroll is now imperative, isAdmin comes from useAuthCheck instead of a separate fetch. ConversationList becomes a pure presentational component. Wrap bubble components in React.memo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
430 B
TypeScript
17 lines
430 B
TypeScript
import React from "react";
|
|
import { cn } from "../lib/utils";
|
|
|
|
export const ToolBubble = React.memo(({ text }: { text: string }) => (
|
|
<div className="flex justify-center message-enter">
|
|
<div
|
|
className={cn(
|
|
"inline-flex items-center gap-1.5 px-3 py-1 rounded-full",
|
|
"bg-leaf-pale border border-leaf-light/50",
|
|
"text-xs text-leaf-dark italic",
|
|
)}
|
|
>
|
|
{text}
|
|
</div>
|
|
</div>
|
|
));
|