mirror of
https://github.com/hexastack/hexabot
synced 2025-05-06 05:44:37 +00:00
fix: update createContext defaultVlaue
This commit is contained in:
parent
d44d7075ab
commit
763ed82512
@ -57,10 +57,9 @@ export interface IBroadcastChannelContext {
|
|||||||
postMessage: (payload: BroadcastChannelPayload) => void;
|
postMessage: (payload: BroadcastChannelPayload) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const BroadcastChannelContext = createContext<IBroadcastChannelContext>({
|
export const BroadcastChannelContext = createContext<
|
||||||
subscribe: () => () => {},
|
IBroadcastChannelContext | undefined
|
||||||
postMessage: () => {},
|
>(undefined);
|
||||||
});
|
|
||||||
|
|
||||||
export const BroadcastChannelProvider: FC<IBroadcastChannelProps> = ({
|
export const BroadcastChannelProvider: FC<IBroadcastChannelProps> = ({
|
||||||
children,
|
children,
|
||||||
|
@ -57,10 +57,9 @@ export interface IBroadcastChannelContext {
|
|||||||
postMessage: (payload: BroadcastChannelPayload) => void;
|
postMessage: (payload: BroadcastChannelPayload) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const BroadcastChannelContext = createContext<IBroadcastChannelContext>({
|
export const BroadcastChannelContext = createContext<
|
||||||
subscribe: () => () => {},
|
IBroadcastChannelContext | undefined
|
||||||
postMessage: () => {},
|
>(undefined);
|
||||||
});
|
|
||||||
|
|
||||||
export const BroadcastChannelProvider: FC<IBroadcastChannelProps> = ({
|
export const BroadcastChannelProvider: FC<IBroadcastChannelProps> = ({
|
||||||
children,
|
children,
|
||||||
|
Loading…
Reference in New Issue
Block a user