import { useMemo } from 'react' ; import type { ParsedTransactionDatum } from '../index' ; import { useParsedTransactionsData } from './useParsedTransactionsData' ; returns export const useParsedTransactionData = ( key ) : { loading : boolean ; data : ParsedTransactionDatum ; } => { const theKey = useMemo ( ( ) => [ key ] , [ key ] ) ; const [ data ] = useParsedTransactionsData ( theKey ) ; return { loading : key !== undefined && data === undefined , data } ; } ;