Skip to content

Commit

Permalink
Add Redirect to Homepage in Settings page for unlogged users
Browse files Browse the repository at this point in the history
Now when a anonymous user visits the settings page he is redirected to
the homepage with active login form.
  • Loading branch information
schettn committed Jul 6, 2020
1 parent bc8c9f8 commit b8a022c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/pages/SettingsPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ class SettingsPage extends React.Component {
const { loggedUser } = this.props;
if (!loggedUser.anonymous) {
this.props.readCache(loggedUser.username);
} else {
this.props.history.push({
pathname: "/",
state: {
actionCard: 1,
},
});
}
};

Expand Down

0 comments on commit b8a022c

Please sign in to comment.