2020-04-14 01:48:11 +02:00
|
|
|
// @flow
|
|
|
|
import React from 'react';
|
|
|
|
import Button from 'component/button';
|
|
|
|
import { formatLbryUrlForWeb } from 'util/url';
|
|
|
|
import { withRouter } from 'react-router';
|
|
|
|
import { URL } from 'config';
|
|
|
|
import * as ICONS from 'constants/icons';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
uri: string,
|
|
|
|
title: ?string,
|
|
|
|
};
|
|
|
|
|
|
|
|
function fileViewerEmbeddedTitle(props: Props) {
|
|
|
|
const { uri, title } = props;
|
|
|
|
|
|
|
|
const lbrytvLink = `${URL}${formatLbryUrlForWeb(uri)}?src=embed`;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="file-viewer__embedded-title">
|
|
|
|
<Button label={title} button="link" href={lbrytvLink} />
|
2020-04-29 20:35:55 +02:00
|
|
|
<Button className="file-viewer__overlay-logo file-viewer__embedded-title-logo" icon={ICONS.LBRY} href={URL} />
|
2020-04-14 01:48:11 +02:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default withRouter(fileViewerEmbeddedTitle);
|