mirror of
https://github.com/logos-messaging/examples.waku.org.git
synced 2026-01-06 14:53:07 +00:00
10 lines
299 B
TypeScript
10 lines
299 B
TypeScript
import { createContext, useContext } from "react";
|
|
import type { WakuLight } from "js-waku/lib/interfaces";
|
|
|
|
export type WakuContextType = {
|
|
waku?: WakuLight;
|
|
};
|
|
|
|
export const WakuContext = createContext<WakuContextType>({ waku: undefined });
|
|
export const useWaku = () => useContext(WakuContext);
|