reuse setImageToPlaceholder

This commit is contained in:
Mikhail Mikheev 2019-04-25 13:27:32 +04:00
parent 8cd9fffb16
commit 1f99bf7b8b
1 changed files with 1 additions and 6 deletions

View File

@ -3,12 +3,7 @@ import * as React from 'react'
import Block from '~/components/layout/Block' import Block from '~/components/layout/Block'
import Img from '~/components/layout/Img' import Img from '~/components/layout/Img'
import Paragraph from '~/components/layout/Paragraph' import Paragraph from '~/components/layout/Paragraph'
import TokenPlaceholder from '../assets/token_placeholder.svg' import { setImageToPlaceholder } from '~/routes/safe/components/Balances/utils'
const setImageToPlaceholder = (e) => {
e.target.onerror = null
e.target.src = TokenPlaceholder
}
type Props = { type Props = {
asset: { asset: {