import { observer } from 'mobx-react' import { useState } from 'react' import useLike from '~/hooks/useLike' import store from '~/store' import '~/styles/components.scss' import { MarketNFTData } from '~/types/store' import { toThousands } from '~/utils' import { copy } from '~/utils/copy' import Modal from './Modal' interface ProductInfoProps { data: MarketNFTData } const ProductInfo = (props: ProductInfoProps) => { const { data } = props const { likeNft } = store.state const { setLike, isLike } = useLike() const [visible, setVisible] = useState(false) const share = () => { const pathname = `${process.env.REACT_APP_SHARE_LINK}detail?id=${data.id}&type=${data.type}` copy(pathname) setVisible(true) } return (
{data.type !== 0 &&
setLike(data.id)} />
}
{data.name}
{data.symbol} {toThousands(data.price)}
铸造者
{data.cast_name}
售卖者
{data.sell_name}
已複製鏈接
) } export default observer(ProductInfo)