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

users: fix UsersPage component with new React #1235

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

tahini
Copy link
Collaborator

@tahini tahini commented Feb 6, 2025

This page caused errors, with an invalid hook call to useNavigate in a constructor. We convert the page to a function component instead.

@tahini tahini requested a review from kaligrafy February 6, 2025 15:15
Copy link
Contributor

@samuel-duhaime samuel-duhaime left a comment

Choose a reason for hiding this comment

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

Small comment.

There are no dependencies for useEffect. It will only work on the first render. Should we pass user as dependencies ?

@tahini
Copy link
Collaborator Author

tahini commented Feb 6, 2025

Small comment.

There are no dependencies for useEffect. It will only work on the first render. Should we pass user as dependencies ?

D'ailleurs veux-tu ben me dire pourquoi on navigue vers une page où on est déjà puisque ce component se render... je vais complètement enlever ce useEffect

This page caused errors, with an invalid hook call to useNavigate in a
constructor. We convert the page to a function component instead.

And remove the `navigate` call that is not necessary
@tahini tahini merged commit 9ac68f2 into chairemobilite:main Feb 6, 2025
5 checks passed
@tahini tahini deleted the fixUsersPage branch February 6, 2025 23:10
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