diff --git a/client/src/pages/ContentPageWrapper/view.jsx b/client/src/pages/ContentPageWrapper/view.jsx index 9a1cdb3f..2a1671d3 100644 --- a/client/src/pages/ContentPageWrapper/view.jsx +++ b/client/src/pages/ContentPageWrapper/view.jsx @@ -3,7 +3,7 @@ import ErrorPage from '@pages/ErrorPage'; import ShowAssetLite from '@pages/ShowAssetLite'; import ShowAssetDetails from '@pages/ShowAssetDetails'; import ShowChannel from '@pages/ShowChannel'; -import { withRouter } from 'react-router-dom'; +import { withRouter, Redirect } from 'react-router-dom'; import { CHANNEL, @@ -15,15 +15,24 @@ import { class ContentPageWrapper extends React.Component { componentDidMount () { const { onHandleShowPageUri, match, homeChannel } = this.props; - onHandleShowPageUri(homeChannel ? { claim: homeChannel } : match.params); + //onHandleShowPageUri(homeChannel ? { claim: homeChannel } : match.params); } componentWillReceiveProps (nextProps) { if (nextProps.match.params !== this.props.match.params) { - this.props.onHandleShowPageUri(nextProps.match.params); + //this.props.onHandleShowPageUri(nextProps.match.params); } } render () { - const { error, requestType } = this.props; + const { error, requestType, match } = this.props; + const { params } = match; + const { claim, identifier } = params; + if (identifier && claim) { + return ; + } else if (identifier) { + // return + } else { + return ; + } if (error) { return ( @@ -31,13 +40,13 @@ class ContentPageWrapper extends React.Component { } switch (requestType) { case CHANNEL: - return ; + // return ; case ASSET_LITE: - return ; + // return ; case ASSET_DETAILS: - return ; + // return ; case SPECIAL_ASSET: - return ; + // return ; default: return

loading...

; } diff --git a/server/chainquery/queries/claimQueries.js b/server/chainquery/queries/claimQueries.js index 9a4cc1a5..f5c736ca 100644 --- a/server/chainquery/queries/claimQueries.js +++ b/server/chainquery/queries/claimQueries.js @@ -104,6 +104,7 @@ export default (db, table, sequelize) => ({ .findAll({ where: { name: claimName, + claim_type: 1, publisher_id: channelClaimId, bid_state: { [sequelize.Op.or]: ['Controlling', 'Active', 'Accepted'] }, }, @@ -215,6 +216,7 @@ export default (db, table, sequelize) => ({ .findAll({ where: { name: claimName, + claim_type: 1, publisher_id: channelId, }, }) diff --git a/server/routes/index.js b/server/routes/index.js index fffdf3cd..6f8ab4fe 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -2,6 +2,6 @@ module.exports = { ...require('./pages').default, ...require('./api').default, ...require('./auth').default, - ...require('./assets').default, + // ...require('./assets').default, ...require('./fallback').default, };