10 lines
293 B
TypeScript
Raw Normal View History

2022-06-17 10:48:15 +10:00
import { createContext, useContext } from "react";
2022-11-18 15:46:00 +11:00
import type { WakuLight } from "@waku/interfaces";
2022-06-17 10:48:15 +10:00
export type WakuContextType = {
waku?: WakuLight;
2022-06-17 10:48:15 +10:00
};
export const WakuContext = createContext<WakuContextType>({ waku: undefined });
export const useWaku = () => useContext(WakuContext);