Skip to content

Commit

Permalink
fix: Fix toggle event data
Browse files Browse the repository at this point in the history
  • Loading branch information
tjtanjin committed Sep 15, 2024
1 parent d142265 commit 0dfbb7d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
8 changes: 0 additions & 8 deletions src/hooks/internal/usePathsInternal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { emitRcbEvent } from "../../services/RcbEventService";
import { usePathsContext } from "../../context/PathsContext";
import { useBotRefsContext } from "../../context/BotRefsContext";
import { useSettingsContext } from "../../context/SettingsContext";
import { useStylesContext } from "../../context/StylesContext";
import { useMessagesContext } from "../../context/MessagesContext";
import { useBotStatesContext } from "../../context/BotStatesContext";
import { Flow } from "../../types/Flow";
import { RcbEvent } from "../../constants/RcbEvent";
Expand All @@ -17,12 +15,6 @@ export const usePathsInternal = () => {
// handles settings
const { settings } = useSettingsContext();

// handles styles
const { styles } = useStylesContext();

// handles messages
const { messages } = useMessagesContext();

// handles paths
const { paths, setPaths } = usePathsContext();

Expand Down
3 changes: 2 additions & 1 deletion src/types/events/RcbToggleAudioEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ import { RcbBaseEvent } from "../internal/events/RcbBaseEvent";
* Defines the data available for toggle audio event.
*/
export type RcbToggleAudioEvent = RcbBaseEvent<{
toggleState: string;
currState: boolean;
newState: boolean;
}>;
3 changes: 2 additions & 1 deletion src/types/events/RcbToggleChatWindowEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ import { RcbBaseEvent } from "../internal/events/RcbBaseEvent";
* Defines the data available for toggle chat window event.
*/
export type RcbToggleChatWindowEvent = RcbBaseEvent<{
toggleState: string;
currState: boolean;
newState: boolean;
}>;
3 changes: 2 additions & 1 deletion src/types/events/RcbToggleNotificationsEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ import { RcbBaseEvent } from "../internal/events/RcbBaseEvent";
* Defines the data available for toggle notifications event.
*/
export type RcbToggleNotificationsEvent = RcbBaseEvent<{
toggleState: string;
currState: boolean;
newState: boolean;
}>;
3 changes: 2 additions & 1 deletion src/types/events/RcbToggleVoiceEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ import { RcbBaseEvent } from "../internal/events/RcbBaseEvent";
* Defines the data available for toggle voice event.
*/
export type RcbToggleVoiceEvent = RcbBaseEvent<{
toggleState: string;
currState: boolean;
newState: boolean;
}>;

0 comments on commit 0dfbb7d

Please sign in to comment.