reuse setImageToPlaceholder
This commit is contained in:
parent
8cd9fffb16
commit
1f99bf7b8b
|
@ -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: {
|
||||||
|
|
Loading…
Reference in New Issue