15 lines
348 B
TypeScript
15 lines
348 B
TypeScript
import React from "react";
|
|
import ValidatorClient from "@nymproject/nym-validator-client";
|
|
|
|
type ClientContext = {
|
|
client: ValidatorClient;
|
|
setClient: (client: ValidatorClient) => void;
|
|
};
|
|
|
|
const defaultValue: ClientContext = {
|
|
client: null,
|
|
setClient: () => {},
|
|
};
|
|
|
|
export const ValidatorClientContext = React.createContext(defaultValue);
|