mirror of
https://github.com/StanGirard/quivr.git
synced 2025-01-05 18:57:48 +03:00
f4aa22417f
* 🚚 move footer component * 🚚 move navbar component * 🚚 move ui components * 🚚 move browser tab icon to public folder * 🚚 move Chat Provider * 🚚 move hooks to lib * 🚚 move helpers to lib * 🚚 move types to lib
16 lines
427 B
TypeScript
16 lines
427 B
TypeScript
"use client";
|
|
|
|
import { createContext } from "react";
|
|
import useChats from "./hooks/useChats";
|
|
import { ChatsState } from "./types";
|
|
|
|
export const ChatsContext = createContext<ChatsState | undefined>(undefined);
|
|
|
|
export const ChatsProvider = ({ children }: { children: React.ReactNode }) => {
|
|
const chatsState = useChats();
|
|
|
|
return (
|
|
<ChatsContext.Provider value={chatsState}>{children}</ChatsContext.Provider>
|
|
);
|
|
};
|