// @flow import React, { useState } from 'react'; import Button from 'component/button'; import ClaimList from 'component/claimList'; import Paginate from 'component/common/paginate'; import { PAGE_SIZE } from 'constants/claim'; import { Form } from 'component/common/form-components/form'; import Icon from 'component/common/icon'; import * as ICONS from '../../constants/icons'; import { FormField } from '../../component/common/form-components/form-field'; import { withRouter } from 'react-router'; type Props = { fetching: boolean, allDownloadedUrlsCount: number, downloadedUrls: Array, downloadedUrlsCount: ?number, history: { replace: string => void }, page: number, query: string, }; function FileListDownloaded(props: Props) { const { fetching, history, query, allDownloadedUrlsCount, downloadedUrls, downloadedUrlsCount } = props; const hasDownloads = allDownloadedUrlsCount > 0; const [searchQuery, setSearchQuery] = useState(''); function handleInputChange(e) { const { value } = e.target; if (value !== searchQuery) { setSearchQuery(value); history.replace(`?query=${value}&page=1`); } } return ( {hasDownloads ? ( {}} className="wunderbar--inline"> } persistedStorageKey="claim-list-downloaded" empty={__('No results for %query%', { query })} uris={downloadedUrls} loading={fetching} /> ) : (

{__("You haven't downloaded anything from LBRY yet.")}

)}
); } export default withRouter(FileListDownloaded);