// @flow import * as ICONS from 'constants/icons'; import * as MODALS from 'constants/modal_types'; import React from 'react'; import classnames from 'classnames'; import { formatCredits } from 'util/format-credits'; import MarkdownPreview from 'component/common/markdown-preview'; import ClaimTags from 'component/claimTags'; import Button from 'component/button'; import LbcSymbol from 'component/common/lbc-symbol'; import FileDetails from 'component/fileDetails'; import FileValues from 'component/fileValues'; import { useIsMobile } from 'effects/use-screensize'; type Props = { uri: string, expandOverride: boolean, // redux description?: string, amount: number, hasSupport?: boolean, isEmpty: boolean, claimIsMine: boolean, pendingAmount: number, doOpenModal: (id: string, {}) => void, }; export default function FileDescription(props: Props) { const { uri, description, amount, hasSupport, isEmpty, doOpenModal, claimIsMine, expandOverride } = props; const isMobile = useIsMobile(); const [expanded, setExpanded] = React.useState(false); const [showCreditDetails, setShowCreditDetails] = React.useState(false); const formattedAmount = formatCredits(amount, 2, true); if (isEmpty) { return {__('Empty claim or metadata info.')}; } return ( <>