@web3-onboard/react
Version:
A collection of React hooks for integrating Web3-Onboard in to React and Next.js projects. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported w
9 lines (8 loc) • 400 B
JavaScript
import { useWeb3Onboard } from '../context.js';
import { useAppState } from './useAppState.js';
export const useNotifications = () => {
const web3Onboard = useWeb3Onboard();
const customNotification = web3Onboard.state.actions.customNotification;
const updateNotify = web3Onboard.state.actions.updateNotify;
return [useAppState('notifications'), customNotification, updateNotify];
};