mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-25 12:22:58 +03:00
ef78dec810
* style(deleteBrainModal): reduce buttons space * refactor: add KnowledgeToFeedInput * feat: update translations * feat: update knowledge feed component * style: reduce knowledge to upload displayer size * feat: move KnowledgeToFeedInput to @lib * refactor: rename useSelectedChatPage to useChatNotificationsSync * feat: change chatPage bg to gray when feed card is opened * style: change feed process submit button bg to purple
21 lines
588 B
TypeScript
21 lines
588 B
TypeScript
import { useEffect, useState } from "react";
|
|
|
|
import { useChatContext } from "@/lib/context";
|
|
|
|
import { checkIfHasPendingRequest } from "../utils/checkIfHasPendingRequest";
|
|
|
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
export const useActionBar = () => {
|
|
const [hasPendingRequests, setHasPendingRequests] = useState(false);
|
|
const { notifications } = useChatContext();
|
|
|
|
useEffect(() => {
|
|
setHasPendingRequests(checkIfHasPendingRequest(notifications));
|
|
}, [notifications]);
|
|
|
|
return {
|
|
hasPendingRequests,
|
|
setHasPendingRequests,
|
|
};
|
|
};
|