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

fix(ui): add login popin connexion #953

Merged
merged 0 commits into from
Apr 21, 2022
Merged

Conversation

pabloHry
Copy link
Contributor

No description provided.

@pabloHry pabloHry self-assigned this Apr 21, 2022
@pabloHry pabloHry requested a review from sbenfares April 21, 2022 13:23
Comment on lines 47 to 52
history: PropTypes.shape({
location: PropTypes.shape({
search: PropTypes.string,
}).isRequired,
push: PropTypes.func.isRequired,
}).isRequired,
Copy link
Contributor

Choose a reason for hiding this comment

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

Ce n'est pas utile

Comment on lines 15 to 24
const login = async (values, { setStatus }) => {
try {
const { access_token } = await _post("/api/login", values);
setAuth(access_token);
history.push("/");
} catch (e) {
console.error(e);
setStatus({ error: e.prettyMessage });
}
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Ce code est dupliqué dans 2 fichiers du coup.
Jte propose de le mettre dans une fonction unique dans un composant dans common/auth/login.js par exemple

@sbenfares sbenfares merged this pull request into develop Apr 21, 2022
@sbenfares sbenfares deleted the feature/popin-connexion branch April 21, 2022 14:11
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.

2 participants