mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-19 20:31:50 +03:00
15 lines
322 B
TypeScript
15 lines
322 B
TypeScript
/* eslint-disable */
|
|
import { useContext } from "react";
|
|
|
|
import { ChatsContext } from "../chats-provider";
|
|
|
|
export const useChatsContext = () => {
|
|
const context = useContext(ChatsContext);
|
|
|
|
if (context === undefined) {
|
|
throw new Error("useChatsStore must be used inside ChatsProvider");
|
|
}
|
|
|
|
return context;
|
|
};
|