mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: remove IBroadcastChannelContext export
This commit is contained in:
@@ -8,16 +8,14 @@
|
||||
|
||||
import { useEffect } from "react";
|
||||
|
||||
import {
|
||||
IBroadcastChannelContext,
|
||||
useBroadcastChannel,
|
||||
} from "@/contexts/broadcast-channel.context";
|
||||
import { useBroadcastChannel } from "@/contexts/broadcast-channel.context";
|
||||
|
||||
export const useSubscribeBroadcastChannel: IBroadcastChannelContext["subscribe"] =
|
||||
(...props) => {
|
||||
const { subscribe } = useBroadcastChannel();
|
||||
export const useSubscribeBroadcastChannel: ReturnType<
|
||||
typeof useBroadcastChannel
|
||||
>["subscribe"] = (...props) => {
|
||||
const { subscribe } = useBroadcastChannel();
|
||||
|
||||
useEffect(() => {
|
||||
subscribe(...props);
|
||||
}, [subscribe, ...props]);
|
||||
};
|
||||
useEffect(() => {
|
||||
subscribe(...props);
|
||||
}, [subscribe, ...props]);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user