Skip to content
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

Addressing issues after email #72

Merged
merged 19 commits into from Feb 3, 2020
Merged

Conversation

bushblade
Copy link
Collaborator

@bushblade bushblade commented Jan 31, 2020

Apart from a minor syntax error in routes/auth/profile.js and some unused and missing cases for auth reducer as far as I can see the app is running fine after fixing these issues.
I can login a user and get redirected, I can logout and get redirected.
I have contacted the individual who raised the issues in the course for more details and will follow up with him and update further if needed.
Should also fix issue #70

@bushblade
Copy link
Collaborator Author

Cleaned up the rest of the client code to be more hook friendly with no linter warnings now for all the useEffect hooks.

instagram: loading || !profile.social ? '' : profile.social.instagram
});
}, [loading, getCurrentProfile]);
if (!profile) getCurrentProfile();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simpler useEffect that follows the linter suggestions.

@@ -4,48 +4,41 @@ import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createProfile, getCurrentProfile } from '../../actions/profile';

const initialState = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial state outside of component to avoid triggering a re-render in useEffect.

@bradtraversy bradtraversy merged commit 07c4216 into bradtraversy:master Feb 3, 2020
bushblade added a commit to bushblade/devconnector_2.0 that referenced this pull request Feb 6, 2020
Merge pull request bradtraversy#72 from bushblade/master
NinjaDev0107 added a commit to NinjaDev0107/devconnector_2.0 that referenced this pull request Nov 20, 2023
NinjaDev0107 added a commit to NinjaDev0107/devconnector_2.0 that referenced this pull request Nov 20, 2023
Merge pull request bradtraversy#72 from bushblade/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants