Skip to content

Commit

Permalink
refactor: Rename hooks for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
tjtanjin committed Oct 3, 2024
1 parent b80b10d commit e00a8bf
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ChangeEvent } from "react";

import MediaDisplay from "../../ChatBotBody/MediaDisplay/MediaDisplay";
import { getMediaFileDetails } from "../../../utils/mediaFileParser";
import { useToastInternal } from "../../../hooks/internal/useToastInternal";
import { useToastInternal } from "../../../hooks/internal/useToastsInternal";
import { useChatWindowInternal } from "../../../hooks/internal/useChatWindowInternal";
import { useSubmitInputInternal } from "../../../hooks/internal/useSubmitInputInternal";
import { useMessagesInternal } from "../../../hooks/internal/useMessagesInternal";
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChatBotBody/ToastPrompt/ToastPrompt.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState, MouseEvent } from "react";

import { useToastInternal } from "../../../hooks/internal/useToastInternal";
import { useToastInternal } from "../../../hooks/internal/useToastsInternal";
import { useSettingsContext } from "../../../context/SettingsContext";
import { useStylesContext } from "../../../context/StylesContext";

Expand Down
4 changes: 2 additions & 2 deletions src/components/ChatBotContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import ChatBotInput from "./ChatBotInput/ChatBotInput";
import ChatBotFooter from "./ChatBotFooter/ChatBotFooter";
import ChatBotButton from "./ChatBotButton/ChatBotButton";
import ChatBotTooltip from "./ChatBotTooltip/ChatBotTooltip";
import { useButtonInternal } from "../hooks/internal/useButtonInternal";
import { useButtonInternal } from "../hooks/internal/useButtonsInternal";
import { useChatWindowInternal } from "../hooks/internal/useChatWindowInternal";
import { useBotEffectInternal } from "../hooks/internal/useBotEffectInternal";
import { useBotEffectInternal } from "../hooks/internal/useBotEffectsInternal";
import { useIsDesktopInternal } from "../hooks/internal/useIsDesktopInternal";
import { useBotRefsContext } from "../context/BotRefsContext";
import { useBotStatesContext } from "../context/BotStatesContext";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useChatHistoryInternal } from "./useChatHistoryInternal";
import { usePathsInternal } from "./usePathsInternal";
import { useTextAreaInternal } from "./useTextAreaInternal";
import { useMessagesInternal } from "./useMessagesInternal";
import { useToastInternal } from "./useToastInternal";
import { useToastInternal } from "./useToastsInternal";
import { useVoiceInternal } from "./useVoiceInternal";
import { useSettingsContext } from "../../context/SettingsContext";
import { useBotStatesContext } from "../../context/BotStatesContext";
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/hooks/internal/useSubmitInputInternal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useRcbEventInternal } from "./useRcbEventInternal";
import { useVoiceInternal } from "./useVoiceInternal";
import { useTextAreaInternal } from "./useTextAreaInternal";
import { useChatWindowInternal } from "./useChatWindowInternal";
import { useToastInternal } from "./useToastInternal";
import { useToastInternal } from "./useToastsInternal";
import { useBotStatesContext } from "../../context/BotStatesContext";
import { useBotRefsContext } from "../../context/BotRefsContext";
import { useSettingsContext } from "../../context/SettingsContext";
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/hooks/useToast.ts → src/hooks/useToasts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useToastInternal } from "./internal/useToastInternal";
import { useToastInternal } from "./internal/useToastsInternal";

/**
* External custom hook for managing toasts.
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { usePaths } from "./hooks/usePaths";
import { useSettings } from "./hooks/useSettings";
import { useStyles } from "./hooks/useStyles";
import { useTextArea } from "./hooks/useTextArea";
import { useToast } from "./hooks/useToast";
import { useToast } from "./hooks/useToasts";
import { useVoice } from "./hooks/useVoice";
import { useChatHistory } from "./hooks/useChatHistory";

Expand Down

0 comments on commit e00a8bf

Please sign in to comment.