diff --git a/js/components/ascribe_routes/proxy_handler.js b/js/components/ascribe_routes/proxy_handler.js
index 06b27422..228f0f62 100644
--- a/js/components/ascribe_routes/proxy_handler.js
+++ b/js/components/ascribe_routes/proxy_handler.js
@@ -101,6 +101,7 @@ export function ProxyHandler(...redirectFunctions) {
if(!UserStore.isLoading()) {
const { currentUser } = this.state;
const { query } = this.props.location;
+
for(let i = 0; i < redirectFunctions.length; i++) {
// if a redirectFunction redirects the user,
// it should return `true` and therefore
diff --git a/js/components/header.js b/js/components/header.js
index b3fd543e..6ca96433 100644
--- a/js/components/header.js
+++ b/js/components/header.js
@@ -55,10 +55,11 @@ let Header = React.createClass({
},
componentDidMount() {
- UserActions.fetchCurrentUser();
UserStore.listen(this.onChange);
- WhitelabelActions.fetchWhitelabel();
+ UserActions.fetchCurrentUser.defer();
+
WhitelabelStore.listen(this.onChange);
+ WhitelabelActions.fetchWhitelabel.defer();
// react-bootstrap 0.25.1 has a bug in which it doesn't
// close the mobile expanded navigation after a click by itself.
@@ -223,7 +224,7 @@ let Header = React.createClass({
{this.getPoweredBy()}
diff --git a/js/components/whitelabel/prize/portfolioreview/pr_app.js b/js/components/whitelabel/prize/portfolioreview/pr_app.js
index 93b1a168..cb40adb9 100644
--- a/js/components/whitelabel/prize/portfolioreview/pr_app.js
+++ b/js/components/whitelabel/prize/portfolioreview/pr_app.js
@@ -41,7 +41,7 @@ let PRApp = React.createClass({
},
render() {
- const { history, children } = this.props;
+ const { history, children, routes } = this.props;
const { currentUser } = this.state;
let style = {};
let subdomain = getSubdomain();
@@ -51,8 +51,8 @@ let PRApp = React.createClass({
if (currentUser && currentUser.email && history.isActive(`/pieces/${getCookie(currentUser.email)}`)) {
header = ;
style = { paddingTop: '0 !important' };
- } else if(history.isActive('/collection') || history.isActive('/settings')) {
- header = ;
+ } else if(currentUser && (currentUser.is_admin || currentUser.is_jury || currentUser.is_judge)) {
+ header = ;
} else {
style = { paddingTop: '0 !important' };
}