cuts release from staging #1073
3 changed files with 20 additions and 9 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,
|
||||||
|
@ -15,15 +15,24 @@ import {
|
||||||
class ContentPageWrapper extends React.Component {
|
class ContentPageWrapper extends React.Component {
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
const { onHandleShowPageUri, match, homeChannel } = this.props;
|
const { onHandleShowPageUri, match, homeChannel } = this.props;
|
||||||
onHandleShowPageUri(homeChannel ? { claim: homeChannel } : match.params);
|
//onHandleShowPageUri(homeChannel ? { claim: homeChannel } : match.params);
|
||||||
}
|
}
|
||||||
componentWillReceiveProps (nextProps) {
|
componentWillReceiveProps (nextProps) {
|
||||||
if (nextProps.match.params !== this.props.match.params) {
|
if (nextProps.match.params !== this.props.match.params) {
|
||||||
this.props.onHandleShowPageUri(nextProps.match.params);
|
//this.props.onHandleShowPageUri(nextProps.match.params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
render () {
|
render () {
|
||||||
const { error, requestType } = this.props;
|
const { error, requestType, match } = this.props;
|
||||||
|
const { params } = match;
|
||||||
|
const { claim, identifier } = params;
|
||||||
|
if (identifier && claim) {
|
||||||
|
return <Redirect to={`https://lbry.tv/${identifier}/${claim}`} />;
|
||||||
|
} else if (identifier) {
|
||||||
|
// return <Redirect to={`https://lbry.tv/${identifier}/`} />
|
||||||
|
} else {
|
||||||
|
return <Redirect to={`https://lbry.tv/${claim}`} />;
|
||||||
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
return (
|
return (
|
||||||
<ErrorPage error={error} />
|
<ErrorPage error={error} />
|
||||||
|
@ -31,13 +40,13 @@ class ContentPageWrapper extends React.Component {
|
||||||
}
|
}
|
||||||
switch (requestType) {
|
switch (requestType) {
|
||||||
case CHANNEL:
|
case CHANNEL:
|
||||||
return <ShowChannel />;
|
// return <ShowChannel />;
|
||||||
case ASSET_LITE:
|
case ASSET_LITE:
|
||||||
return <ShowAssetLite />;
|
// return <ShowAssetLite />;
|
||||||
case ASSET_DETAILS:
|
case ASSET_DETAILS:
|
||||||
return <ShowAssetDetails />;
|
// return <ShowAssetDetails />;
|
||||||
case SPECIAL_ASSET:
|
case SPECIAL_ASSET:
|
||||||
return <ShowChannel />;
|
// return <ShowChannel />;
|
||||||
default:
|
default:
|
||||||
return <p>loading...</p>;
|
return <p>loading...</p>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,7 @@ export default (db, table, sequelize) => ({
|
||||||
.findAll({
|
.findAll({
|
||||||
where: {
|
where: {
|
||||||
name: claimName,
|
name: claimName,
|
||||||
|
claim_type: 1,
|
||||||
publisher_id: channelClaimId,
|
publisher_id: channelClaimId,
|
||||||
bid_state: { [sequelize.Op.or]: ['Controlling', 'Active', 'Accepted'] },
|
bid_state: { [sequelize.Op.or]: ['Controlling', 'Active', 'Accepted'] },
|
||||||
},
|
},
|
||||||
|
@ -215,6 +216,7 @@ export default (db, table, sequelize) => ({
|
||||||
.findAll({
|
.findAll({
|
||||||
where: {
|
where: {
|
||||||
name: claimName,
|
name: claimName,
|
||||||
|
claim_type: 1,
|
||||||
publisher_id: channelId,
|
publisher_id: channelId,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,6 +2,6 @@ module.exports = {
|
||||||
...require('./pages').default,
|
...require('./pages').default,
|
||||||
...require('./api').default,
|
...require('./api').default,
|
||||||
...require('./auth').default,
|
...require('./auth').default,
|
||||||
...require('./assets').default,
|
// ...require('./assets').default,
|
||||||
...require('./fallback').default,
|
...require('./fallback').default,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue