otterscan/src/useSelectedTransaction.ts
2021-11-07 08:21:56 -03:00

10 lines
290 B
TypeScript

import { createContext, useContext } from "react";
import { TransactionData } from "./types";
export const SelectedTransactionContext = createContext<
TransactionData | null | undefined
>(undefined);
export const useSelectedTransaction = () =>
useContext(SelectedTransactionContext);