fix: resolve TypeScript errors in migrated components
This commit is contained in:
@@ -217,12 +217,12 @@ export const Chat = forwardRef<ChatRef, ChatProps>(function Chat({
|
||||
|
||||
// Show a witty loading message after 3 seconds
|
||||
const quipTimerId = setTimeout(() => {
|
||||
setLoadingQuip(getRandomQuip(WAITING_QUIPS));
|
||||
setLoadingQuip(getRandomQuip(WAITING_QUIPS) ?? null);
|
||||
}, 3000);
|
||||
|
||||
// Change quip every 5 seconds if still waiting
|
||||
const quipIntervalId = setInterval(() => {
|
||||
setLoadingQuip(getRandomQuip(WAITING_QUIPS));
|
||||
setLoadingQuip(getRandomQuip(WAITING_QUIPS) ?? null);
|
||||
}, 5000);
|
||||
|
||||
try {
|
||||
|
||||
@@ -45,7 +45,7 @@ export function MessageList({ messages, isLoading, loadingQuip }: MessageListPro
|
||||
<MessageBubble key={message.id} message={message} />
|
||||
))}
|
||||
|
||||
{isLoading && <LoadingIndicator quip={loadingQuip} />}
|
||||
{isLoading && <LoadingIndicator {...(loadingQuip != null && { quip: loadingQuip })} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user