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

Fixes #1472 - Create withAuth component to manage automatic redirect to login page #1852

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

bconti123
Copy link
Member

Fixes #1472

What changes did you make and why did you make them?

  • Created withAuth hook to manage automatic redirect to login page.
  • Removed instances of old redirect method and refactored code in Events, UserAdmin, ProjectList, and ManageProjects components.
  • Added auth to the props of ManageProjects and ProjectList components.
  • Added an explanation of the withAuth hook as a comment in App.jsx.
  • Why: To make the code cleaner and reduce the number of lines. In the future, withAuth component will be added to the new component.
  • Wasn't able to fix the redirect method, so decided to leave it as is in the ProjectForm component and index.jsx due to the complexity of the code.

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.

Create withAuth component to manage automatic redirect to login page
2 participants