mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-17 11:21:35 +03:00
e2c1a027b0
Issue: https://github.com/StanGirard/quivr/issues/1888 - Add Spinner when history is loading - Change chat messages fetching logic - Add cha view new design Demo: https://github.com/StanGirard/quivr/assets/63923024/c4341ccf-bacd-4720-9aa1-127dd557a75c
15 lines
381 B
TypeScript
15 lines
381 B
TypeScript
import { useContext } from "react";
|
|
|
|
import { ChatsContext } from "../chats-provider";
|
|
|
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
export const useChatsContext = () => {
|
|
const context = useContext(ChatsContext);
|
|
|
|
if (context === undefined) {
|
|
throw new Error("useChatsContext must be used inside ChatsProvider");
|
|
}
|
|
|
|
return context;
|
|
};
|