From 6340967e80c360338d024abeac0a29b0e2feb544 Mon Sep 17 00:00:00 2001 From: Andre Fonseca Date: Fri, 11 Sep 2020 13:12:34 +0100 Subject: [PATCH] testing --- src/Expensify.js | 17 +++++++++++++++-- src/lib/actions/Report.js | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Expensify.js b/src/Expensify.js index 2877a2caf106c..42a7df3e7ac10 100644 --- a/src/Expensify.js +++ b/src/Expensify.js @@ -30,7 +30,7 @@ const propTypes = { }; const defaultProps = { - redirectTo: '', + redirectTo: ROUTES.HOME, }; class Expensify extends Component { @@ -81,9 +81,22 @@ class Expensify extends Component { ); } + + console.log(`this.state.authToken: ${this.state.authToken}`); + if (this.state.authToken === undefined) { + console.log('will got to login'); + return ( + + + + + ); + } + + console.log('will got to home page before' + this.props.redirectTo); const redirectTo = !this.state.authToken ? ROUTES.SIGNIN : this.props.redirectTo; + console.log('will got to home page after' + redirectTo); return ( - // TODO: Mobile does not support Beforeunload // diff --git a/src/lib/actions/Report.js b/src/lib/actions/Report.js index 49f0325e9b347..6386f1e041212 100644 --- a/src/lib/actions/Report.js +++ b/src/lib/actions/Report.js @@ -225,6 +225,7 @@ function updateReportWithNewAction(reportID, reportAction) { * Initialize our pusher subscriptions to listen for new report comments */ function subscribeToReportCommentEvents() { + console.log(`private-user-accountID-${currentUserAccountID}`); const pusherChannelName = `private-user-accountID-${currentUserAccountID}`; if (Pusher.isSubscribed(pusherChannelName) || Pusher.isAlreadySubscribing(pusherChannelName)) { return;