quivr/frontend/app/chat/[chatId]/components/ActionsBar/utils/checkIfHasPendingRequest.ts
Mamadou DICKO 7e1e13fab5
feat(feedBrain): add request pending message #1135 (#1136)
* feat(feed brain): add pending message

* feat: add 'filesUploading' translation

* feat(chatPage): update tests
2023-09-08 09:57:21 +02:00

9 lines
243 B
TypeScript

import { ChatItem } from "../../../types";
export const checkIfHasPendingRequest = (chatItems: ChatItem[]): boolean => {
return chatItems.some(
(item) =>
item.item_type === "NOTIFICATION" && item.body.status === "Pending"
);
};