lbry-desktop/ui/component/fileSubtitle/view.jsx

31 lines
804 B
React
Raw Normal View History

2020-03-14 12:07:36 -04:00
// @flow
import React from 'react';
import DateTime from 'component/dateTime';
import FileViewCount from 'component/fileViewCount';
2020-09-30 16:46:20 -04:00
import FileActions from 'component/fileActions';
2020-03-14 12:07:36 -04:00
type Props = {
uri: string,
2021-03-18 13:21:49 -04:00
livestream?: boolean,
2021-03-19 16:14:31 -04:00
activeViewers?: number,
isLive?: boolean,
2020-03-14 12:07:36 -04:00
};
function FileSubtitle(props: Props) {
const { uri, livestream = false, activeViewers, isLive = false } = props;
2020-03-14 12:07:36 -04:00
return (
<div className="media__subtitle--between">
2020-09-30 16:46:20 -04:00
<div className="file__viewdate">
2021-03-18 13:21:49 -04:00
{livestream ? <span>{__('Right now')}</span> : <DateTime uri={uri} show={DateTime.SHOW_DATE} />}
<FileViewCount uri={uri} livestream={livestream} activeViewers={activeViewers} isLive={isLive} />
2020-09-30 16:46:20 -04:00
</div>
<FileActions uri={uri} />
2020-03-14 12:07:36 -04:00
</div>
);
}
export default FileSubtitle;