From e763aebb111bfdd04ec368a678538d8e730889cb Mon Sep 17 00:00:00 2001 From: cleverbeagle Date: Sun, 9 Jul 2017 17:36:31 -0500 Subject: [PATCH] remove unnecessary loggingIn check when rendering authenticated and public routes --- .meteor/versions | 4 ++-- imports/ui/components/Authenticated/Authenticated.js | 9 ++++----- imports/ui/components/Public/Public.js | 9 ++++----- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.meteor/versions b/.meteor/versions index e8ba76a..d3915c8 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -38,7 +38,7 @@ es5-shim@4.6.15 facebook-oauth@1.3.1 fastclick@1.0.13 fortawesome:fontawesome@4.7.0 -fourseven:scss@4.5.0 +fourseven:scss@4.5.4 geojson-utils@1.0.10 github-oauth@1.2.0 google-oauth@1.2.4 @@ -93,7 +93,7 @@ templating@1.3.2 templating-compiler@1.3.2 templating-runtime@1.3.2 templating-tools@1.1.2 -themeteorchef:bert@2.1.2 +themeteorchef:bert@2.1.3 tmeasday:check-npm-versions@0.3.1 tracker@1.1.3 twbs:bootstrap@3.3.6 diff --git a/imports/ui/components/Authenticated/Authenticated.js b/imports/ui/components/Authenticated/Authenticated.js index f13f8f7..7207ad0 100644 --- a/imports/ui/components/Authenticated/Authenticated.js +++ b/imports/ui/components/Authenticated/Authenticated.js @@ -5,12 +5,11 @@ import { Route, Redirect } from 'react-router-dom'; const Authenticated = ({ loggingIn, authenticated, component, ...rest }) => ( { - if (loggingIn) return
; - return authenticated ? + render={props => ( + authenticated ? (React.createElement(component, { ...props, loggingIn, authenticated })) : - (); - }} + () + )} /> ); diff --git a/imports/ui/components/Public/Public.js b/imports/ui/components/Public/Public.js index 6a54c91..e1abfcb 100644 --- a/imports/ui/components/Public/Public.js +++ b/imports/ui/components/Public/Public.js @@ -5,12 +5,11 @@ import { Route, Redirect } from 'react-router-dom'; const Public = ({ loggingIn, authenticated, component, ...rest }) => ( { - if (loggingIn) return
; - return !authenticated ? + render={props => ( + !authenticated ? (React.createElement(component, { ...props, loggingIn, authenticated })) : - (); - }} + () + )} /> );