-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#161290964 Build local login feature #31
Conversation
e314ee4
to
40a93cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your App.js file on line 21 you happen to be using componentWillMount() which at this point has been deprecated and moreover if you would want to check the status of the user after the component (in this cace the App) is rendered then you would consider using ComponentDIdMount versus what you currently have.
This resource should provide more insight -> https://daveceddia.com/where-fetch-data-componentwillmount-vs-componentdidmount/
40a93cb
to
c65c952
Compare
c65c952
to
459da6e
Compare
@@ -84,14 +102,14 @@ export class LoginPage extends Component { | |||
{/* Email input div */} | |||
<div id="login-form"> | |||
<h5>Sign in with your email</h5> | |||
<form id="login-form"> | |||
<form onSubmit={this.handleSubmit} id="login-form"> | |||
<div className="row login-form-section text-center"> | |||
<div className="col-md-8 offset-md-2"> | |||
<div className="input-group mb-4 login-group"> | |||
<div className="input-group-prepend"> | |||
<span className="input-group-text transparent email-addon" id="basic-addon1"><img src={emailIcon} alt="email icon" /></span> | |||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing spaces not allowed no-trailing-spaces
) | ||
.then(res => res.json(), error => dispatch( | ||
globalFailure(['We were unable to log you in, please try again.', error]) | ||
)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected newline before ')' function-paren-newline
export const logUserIn = tokenQueryString => dispatch => fetch( | ||
`${process.env.API_BASE_URL}/users/login${tokenQueryString}` | ||
) | ||
.then(res => res.json(), error => dispatch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected newline after '(' function-paren-newline
|
||
export const logUserIn = tokenQueryString => dispatch => fetch( | ||
`${process.env.API_BASE_URL}/users/login${tokenQueryString}` | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected newline before ')' function-paren-newline
} | ||
}); | ||
|
||
export const logUserIn = tokenQueryString => dispatch => fetch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected newline after '(' function-paren-newline
|
||
export const sendEmailLink = email => dispatch => fetch( | ||
`${process.env.API_BASE_URL}/users/login`, requestOptions({ email }, 'POST', null) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected newline before ')' function-paren-newline
import { globalLoading, globalFailure, globalLoggedIn } from './globalActions'; | ||
import requestOptions from '../utils/requestOptions'; | ||
|
||
export const sendEmailLink = email => dispatch => fetch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected newline after '(' function-paren-newline
- add tests - add login action creators - add welcome page component [Starts #161290964]
459da6e
to
c3d6c71
Compare
@sulenchy this problem has been resolved. The problem was my review app had not been added to the Google developer console. |
What does this PR do?
Have user be able to login to their Author's Haven accounts
Description of Task to be completed?
How should this be manually tested?
npm start
to spin up the serverAny background context you want to provide?
N/A
What are the relevant pivotal tracker stories?
#161290964
Screenshots (if appropriate)
Questions:
N/A
Review App