From 9fe34504e9aa7f076afaf24501d7891d315fa49e Mon Sep 17 00:00:00 2001 From: Francis Li Date: Tue, 11 Dec 2018 13:21:37 -0800 Subject: [PATCH] Disable login/save (#778) --- client/components/Nav.jsx | 8 +++++--- server/views/index.js | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx index 59041120..03ec4afd 100644 --- a/client/components/Nav.jsx +++ b/client/components/Nav.jsx @@ -15,6 +15,8 @@ import { const triangleUrl = require('../images/down-filled-triangle.svg'); const logoUrl = require('../images/p5js-logo-small.svg'); +const __process = (typeof global !== 'undefined' ? global : window).process; + class Nav extends React.PureComponent { constructor(props) { super(props); @@ -150,7 +152,7 @@ class Nav extends React.PureComponent { New - { (!this.props.project.owner || this.isUserOwner()) && + { __process.env.LOGIN_ENABLED && (!this.props.project.owner || this.isUserOwner()) &&
  • - { !this.props.user.authenticated && + { __process.env.LOGIN_ENABLED && !this.props.user.authenticated && } - { this.props.user.authenticated && + { __process.env.LOGIN_ENABLED && this.props.user.authenticated &&