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';
|
2021-11-05 14:14:00 -05:00
|
|
|
import ClaimPreviewReset from 'component/claimPreviewReset';
|
2021-12-22 10:12:44 -06:00
|
|
|
import LivestreamDateTime from 'component/livestreamDateTime';
|
2020-03-14 12:07:36 -04:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
uri: string,
|
2021-03-18 13:21:49 -04:00
|
|
|
livestream?: boolean,
|
2021-04-14 11:40:36 -04:00
|
|
|
isLive?: boolean,
|
2020-03-14 12:07:36 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
function FileSubtitle(props: Props) {
|
2021-11-17 17:23:01 +08:00
|
|
|
const { uri, livestream = false, isLive = false } = props;
|
2020-03-14 12:07:36 -04:00
|
|
|
return (
|
2021-11-05 14:14:00 -05:00
|
|
|
<>
|
|
|
|
<div className="media__subtitle--between">
|
|
|
|
<div className="file__viewdate">
|
2021-12-22 10:12:44 -06:00
|
|
|
{livestream && isLive && <LivestreamDateTime uri={uri} />}
|
2022-01-03 09:41:00 -03:00
|
|
|
{!livestream && <DateTime uri={uri} type="date" />}
|
2021-11-17 17:23:01 +08:00
|
|
|
<FileViewCount uri={uri} livestream={livestream} isLive={isLive} />
|
2021-11-05 14:14:00 -05:00
|
|
|
</div>
|
2020-09-30 16:46:20 -04:00
|
|
|
|
2021-11-05 14:14:00 -05:00
|
|
|
<FileActions uri={uri} hideRepost={livestream} livestream={livestream} />
|
|
|
|
</div>
|
|
|
|
{livestream && isLive && <ClaimPreviewReset uri={uri} />}
|
|
|
|
</>
|
2020-03-14 12:07:36 -04:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default FileSubtitle;
|