Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Account Page Crashes On Signout #24

Open
freddiemixell opened this issue Jul 28, 2019 · 1 comment
Open

Account Page Crashes On Signout #24

freddiemixell opened this issue Jul 28, 2019 · 1 comment

Comments

@freddiemixell
Copy link

Expected Behavior

Account Page should redirect to sign in page when sign out button is clicked.

Current Behavior

Signing out from the account page causes the app to crash.

Possible Solution

Checking to see if the authUser is null and if it is returning null instead of the component.

Steps to Reproduce

  1. Sign in
  2. Navigate to Account Page
  3. Sign out
  4. App crashed authUser.email undefined.
@freddiemixell
Copy link
Author

freddiemixell commented Jul 28, 2019

const AccountPage = ({ authUser }) => {
if ( null === authUser ) {
return null;
}
return (
<AppWithAuthorization>
<h1>Account: {authUser.email}</h1>
<PasswordForgetForm />
<PasswordChangeForm />
</AppWithAuthorization>
);
};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant