From 67e198db2f02629cd18a57ca05f8d465f9eca941 Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 11 Jun 2020 12:29:26 -0400 Subject: [PATCH] prevent server side redirect --- client/src/pages/ContentPageWrapper/view.jsx | 20 +++++++++++--------- server/routes/index.js | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/client/src/pages/ContentPageWrapper/view.jsx b/client/src/pages/ContentPageWrapper/view.jsx index 79d6b2c3..2a1671d3 100644 --- a/client/src/pages/ContentPageWrapper/view.jsx +++ b/client/src/pages/ContentPageWrapper/view.jsx @@ -15,21 +15,23 @@ 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, match } = this.props; const { params } = match; const { claim, identifier } = params; - if (identifier) { - return + if (identifier && claim) { + return ; + } else if (identifier) { + // return } else { - return + return ; } if (error) { return ( @@ -38,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/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, };