Merge pull request #1069 from lbryio/redirectTv
redirect content to lbry.tv
This commit is contained in:
commit
b410eb8c94
1 changed files with 9 additions and 2 deletions
|
@ -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} />
|
||||||
|
|
Loading…
Reference in a new issue