useTokenMetadata
Hook for accessing the name and thumbnail of a token given its id.
import { useTokenMetadata } from '@public-assembly/builder-utils'
Usage
import { useTokenMetadata } from '@public-assembly/builder-utils'
function App() {
const { tokenName, tokenThumbnail } = useTokenMetadata('1')
return <>
<p>{tokenName}</p>
<img src={tokenThumbnail}></img>
</>
}
Returns
{
tokenName?: string
tokenThumbnail?: string
}