redirect content to lbry.tv

This commit is contained in:
jessop 2020-06-10 17:01:44 -04:00
parent dfa6db6276
commit efc38529c7

View file

@ -3,7 +3,7 @@ import ErrorPage from '@pages/ErrorPage';
import ShowAssetLite from '@pages/ShowAssetLite'; import ShowAssetLite from '@pages/ShowAssetLite';
import ShowAssetDetails from '@pages/ShowAssetDetails'; import ShowAssetDetails from '@pages/ShowAssetDetails';
import ShowChannel from '@pages/ShowChannel'; import ShowChannel from '@pages/ShowChannel';
import { withRouter } from 'react-router-dom'; import { withRouter, Redirect } from 'react-router-dom';
import { import {
CHANNEL, CHANNEL,
@ -23,7 +23,14 @@ class ContentPageWrapper extends React.Component {
} }
} }
render () { render () {
const { error, requestType } = this.props; const { error, requestType, match } = this.props;
const { params } = match;
const { claim, identifier } = params;
if (identifier) {
return <Redirect to={`https://lbry.tv/${identifier}/${claim}`} />
} else {
return <Redirect to={`https://lbry.tv/${claim}`} />
}
if (error) { if (error) {
return ( return (
<ErrorPage error={error} /> <ErrorPage error={error} />