Fixed auth token header, Moved dispatch out of constructors
This commit is contained in:
@@ -13,8 +13,7 @@ import { sendLoginRequest } from "../../actions/auth/saga.actions";
|
||||
import Error from "../Shared/Error";
|
||||
|
||||
class Login extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
componentWillMount() {
|
||||
this.props.dispatch(clearAuthRequestError());
|
||||
this.props.dispatch(clearAuthRequestSuccess());
|
||||
}
|
||||
|
@@ -14,8 +14,7 @@ import { sendRegisterRequest } from "../../actions/auth/saga.actions";
|
||||
import Error from "../Shared/Error";
|
||||
|
||||
class Register extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
componentWillMount() {
|
||||
this.props.dispatch(clearAuthRequestError());
|
||||
this.props.dispatch(clearAuthRequestSuccess());
|
||||
}
|
||||
|
@@ -13,8 +13,7 @@ import { sendChangePasswordRequest } from "../../actions/auth/saga.actions";
|
||||
import Error from "../Shared/Error";
|
||||
|
||||
class Settings extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
componentWillMount() {
|
||||
this.props.dispatch(clearAuthRequestError());
|
||||
this.props.dispatch(clearAuthRequestSuccess());
|
||||
}
|
||||
|
@@ -12,8 +12,7 @@ import { sendEmailVerificationRequest } from "../../actions/auth/saga.actions";
|
||||
import Error from "../Shared/Error";
|
||||
|
||||
class VerifyEmail extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
componentWillMount() {
|
||||
const emailKey = this.props.match.params.emailKey;
|
||||
this.props.dispatch(clearEmailVerificationError());
|
||||
this.props.dispatch(clearEmailVerificationSuccess());
|
||||
|
Reference in New Issue
Block a user