quivr/frontend/lib/context/ChatsProvider/chats-provider.tsx
Zineb El Bachiri 1d7bc8a5bc
Devx/add linter rules (#331)
* remove duplicate import

* 🚧 add new linter configuration

* 🧑‍💻  add and run prettier

* 🐛 add babel parser for linter

* 🧑‍💻 add lint-fix command

* 🚨 use lint-fix

* 🚨 remove 'FC' as a type. Use const and JSX.Element

* 🚨 enforce arrow function rule from linter

* 🔥 delete unused file

* 🚨 adding /* eslint-disable */ in failing files

* 💩 add ts-expect-error to Victory components
2023-06-15 11:52:46 +02:00

18 lines
449 B
TypeScript

/* eslint-disable */
"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>
);
};