cdl-ruby-chat
TypeScript icon, indicating that this package has built-in type declarations

0.0.57 • Public • Published

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 the user object as well as the accessToken and sets them inside localStorage.

Readme

Keywords

none

Package Sidebar

Install

npm i cdl-ruby-chat

Weekly Downloads

11

Version

0.0.57

License

ISC

Unpacked Size

33.1 MB

Total Files

134

Last publish

Collaborators

  • pavle99