From f5c63dddad4ed6c10ad34be26ac7069b42cd0d9d Mon Sep 17 00:00:00 2001 From: catarak Date: Wed, 17 Aug 2016 19:00:05 -0400 Subject: [PATCH] change nav if user is logged in, if project is saved --- client/components/Nav.js | 68 +++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 22 deletions(-) diff --git a/client/components/Nav.js b/client/components/Nav.js index 1e1e2ee5..cdf3cccb 100644 --- a/client/components/Nav.js +++ b/client/components/Nav.js @@ -21,28 +21,52 @@ function Nav(props) { Save -
  • - - Duplicate - -
  • -
  • - - Download - -
  • -
  • - - Fullscreen - -
  • -
  • -

    - - Open - -

    -
  • + {(() => { // eslint-disable-line + if (props.project.id) { + return ( +
  • + + Duplicate + +
  • + ); + } + })()} + {(() => { // eslint-disable-line + if (props.project.id) { + return ( +
  • + + Download + +
  • + ); + } + })()} + {(() => { // eslint-disable-line + if (props.project.id) { + return ( +
  • + + Fullscreen + +
  • + ); + } + })()} + {(() => { // eslint-disable-line + if (props.user.authenticated) { + return ( +
  • +

    + + Open + +

    +
  • + ); + } + })()}