0.0.57 • Published 2 years ago
cdl-ruby-chat
Licence
ISC
Version
0.0.57
Deps
1
Size
31.6 MB
Vulns
0
Weekly
0
CDL ruby chat
Description
Chat component for the Ruby chatbot.
Usage
First, you need to install the @tanstack/react-query package:
npm install @tanstack/react-query
Then, wrap your app with the QueryClientProvider and pass it a QueryClient instance:
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
const queryClient = new QueryClient();
export default function App() {
return (
<QueryClientProvider client={queryClient}>
<YourApp />
</QueryClientProvider>
);
}
Finally, you can use the component anywhere in your app:
import Chat from "cdl-ruby-chat";
export default function YourApp() {
return <Chat />;
}
Props
user: Currently logged in user. If the user is not logged in, you will only be able to send 5 messages per day.loginUser: A function that receives data that has theuserobject as well as theaccessTokenand sets them insidelocalStorage.