fix: Multiple API calls when bypassing /login
This commit is contained in:
@@ -4,7 +4,7 @@ import { IUser } from "../models/user";
|
||||
|
||||
import Application from "../components/app";
|
||||
|
||||
import { setAuthenticated, setUser } from "../actions";
|
||||
import { setAuthenticated, setUser, setDidLogin } from "../actions";
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
@@ -15,6 +15,7 @@ const mapStateToProps = state => {
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
setAuthenticated: (status: boolean) => dispatch(setAuthenticated(status)),
|
||||
setDidLogin: (state: boolean) => dispatch(setDidLogin(state)),
|
||||
setUser: (user: IUser) => dispatch(setUser(user)),
|
||||
};
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@ const mapStateToProps = state => {
|
||||
snackOpen: state.login.snackOpen,
|
||||
snackMsg: state.login.snackMsg,
|
||||
authenticated: state.authenticated,
|
||||
didLogin: state.didLogin,
|
||||
};
|
||||
};
|
||||
const mapDispatchToProps = dispatch => {
|
||||
|
||||
Reference in New Issue
Block a user