2016-12-23 07:57:01 +01:00
|
|
|
import React from 'react';
|
2017-04-23 11:56:50 +02:00
|
|
|
import lbry from 'lbry.js';
|
|
|
|
import lbryuri from 'lbryuri.js';
|
2017-04-07 07:15:22 +02:00
|
|
|
import Link from 'component/link';
|
2017-04-23 16:01:00 +02:00
|
|
|
import FileCardStream from 'component/fileCardStream'
|
|
|
|
import FileTileStream from 'component/fileTileStream'
|
|
|
|
import FileActions from 'component/fileActions';
|
|
|
|
|
|
|
|
class FileTile extends React.Component {
|
|
|
|
render() {
|
|
|
|
const {
|
|
|
|
displayStyle,
|
2017-04-29 11:50:29 +02:00
|
|
|
uri,
|
|
|
|
claim,
|
2017-04-23 16:01:00 +02:00
|
|
|
} = this.props
|
2017-04-28 17:14:44 +02:00
|
|
|
|
2017-04-29 11:50:29 +02:00
|
|
|
if(!claim) {
|
2017-04-23 16:01:00 +02:00
|
|
|
if (displayStyle == 'card') {
|
|
|
|
return <FileCardStream uri={uri} />
|
2017-05-01 05:38:14 +02:00
|
|
|
}
|
2017-04-23 16:01:00 +02:00
|
|
|
return null
|
2017-01-13 04:23:12 +01:00
|
|
|
}
|
|
|
|
|
2017-04-23 16:01:00 +02:00
|
|
|
return displayStyle == 'card' ?
|
2017-04-29 11:50:29 +02:00
|
|
|
<FileCardStream uri={uri} />
|
2017-04-23 16:01:00 +02:00
|
|
|
:
|
2017-04-29 11:50:29 +02:00
|
|
|
<FileTileStream uri={uri} key={uri} />
|
2017-01-13 04:23:12 +01:00
|
|
|
}
|
2017-04-23 16:01:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export default FileTile
|