From 8eee64a4df0dca6a0adc5bb18ace816025c35691 Mon Sep 17 00:00:00 2001 From: tjtanjin Date: Sat, 14 Sep 2024 01:43:34 +0800 Subject: [PATCH] chore: Minor code cleanup --- src/components/ChatBot.tsx | 2 ++ src/components/ChatBotBody/ToastPrompt/ToastPrompt.tsx | 2 +- src/components/ChatBotContainer.tsx | 2 ++ src/components/ChatBotInput/ChatBotInput.tsx | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/ChatBot.tsx b/src/components/ChatBot.tsx index 271da654..bc9c5895 100644 --- a/src/components/ChatBot.tsx +++ b/src/components/ChatBot.tsx @@ -8,10 +8,12 @@ import { Theme } from "../types/Theme"; /** * Determines if user gave a provider or if one needs to be created, before rendering the chatbot. * + * @param id id to uniquely identify the chatbot * @param flow conversation flow for the bot * @param settings settings to setup the bot * @param styles styles to setup the bot * @param themes themes to apply to the bot + * @param plugins plugins to initialize */ const ChatBot = ({ id, diff --git a/src/components/ChatBotBody/ToastPrompt/ToastPrompt.tsx b/src/components/ChatBotBody/ToastPrompt/ToastPrompt.tsx index 21224e38..a1193286 100644 --- a/src/components/ChatBotBody/ToastPrompt/ToastPrompt.tsx +++ b/src/components/ChatBotBody/ToastPrompt/ToastPrompt.tsx @@ -1,10 +1,10 @@ import { useEffect, useState, MouseEvent } from "react"; +import { useToast } from "../../../hooks/useToast"; import { useSettingsContext } from "../../../context/SettingsContext"; import { useStylesContext } from "../../../context/StylesContext"; import "./ToastPrompt.css"; -import { useToast } from "../../../hooks/useToast"; /** * Provides toast message prompt with information. diff --git a/src/components/ChatBotContainer.tsx b/src/components/ChatBotContainer.tsx index 9bb69640..fa1ebe75 100644 --- a/src/components/ChatBotContainer.tsx +++ b/src/components/ChatBotContainer.tsx @@ -19,6 +19,8 @@ import "./ChatBotContainer.css"; /** * Integrates, loads plugins and contains the various components that makeup the chatbot. + * + * @param plugins plugins to initialize */ const ChatBotContainer = ({ plugins diff --git a/src/components/ChatBotInput/ChatBotInput.tsx b/src/components/ChatBotInput/ChatBotInput.tsx index 32ee1c3f..7e293fb3 100644 --- a/src/components/ChatBotInput/ChatBotInput.tsx +++ b/src/components/ChatBotInput/ChatBotInput.tsx @@ -10,13 +10,13 @@ import React, { import { isDesktop } from "../../utils/displayChecker"; import { useFirstInteractionInternal } from "../../hooks/internal/useFirstInteractionInternal"; import { useSubmitInputInternal } from "../../hooks/internal/useSubmitInputInternal"; +import { useTextArea } from "../../hooks/useTextArea"; import { useBotStatesContext } from "../../context/BotStatesContext"; import { useBotRefsContext } from "../../context/BotRefsContext"; import { useSettingsContext } from "../../context/SettingsContext"; import { useStylesContext } from "../../context/StylesContext"; import "./ChatBotInput.css"; -import { useTextArea } from "../../hooks/useTextArea"; /** * Contains chat input field for user to enter messages.