fix quote reader duplicate rendering (#4845)

This commit is contained in:
heheer 2025-05-20 20:21:00 +08:00 committed by GitHub
parent 593ebfd269
commit 0f3bfa280a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,16 +13,13 @@ const ChatQuoteList = ({
metadata: GetQuoteProps;
onClose: () => void;
}) => {
return (
<>
{'collectionId' in metadata && (
<CollectionQuoteReader rawSearch={rawSearch} metadata={metadata} onClose={onClose} />
)}
{'collectionIdList' in metadata && (
<QuoteReader rawSearch={rawSearch} metadata={metadata} onClose={onClose} />
)}
</>
);
if ('collectionId' in metadata) {
return <CollectionQuoteReader rawSearch={rawSearch} metadata={metadata} onClose={onClose} />;
} else if ('collectionIdList' in metadata) {
return <QuoteReader rawSearch={rawSearch} metadata={metadata} onClose={onClose} />;
}
return null;
};
export default ChatQuoteList;