Skip to content

fix:Converted useAuthRole to React Context provider to prevent redundant calls and improve latency. - #49

Merged
Mysterious-Wizard merged 1 commit into
masterfrom
fix/Latency
Aug 17, 2026
Merged

Mysterious-Wizard merged 1 commit into
masterfrom
fix/Latency

Conversation

@Mysterious-Wizard

Copy link
Copy Markdown
Collaborator
  1. Refactored useAuthRole into a React Context Provider to share authentication state globally across the application.
  2. Wrapped the root component in AuthRoleProvider, ensuring the database is only queried once when the application initially mounts.
  3. This eliminates the redundant network calls that were previously firing whenever we reloaded a page, and thus should improve the latency of the application.

Copilot AI lite review requested due to automatic review settings August 17, 2026 17:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
robotics-pec-github-io Ready Ready Preview Aug 17, 2026 5:59pm

@Mysterious-Wizard
Mysterious-Wizard merged commit f24bded into master Aug 17, 2026
4 checks passed
@Mysterious-Wizard
Mysterious-Wizard deleted the fix/Latency branch August 21, 2026 10:07

This branch was successfully deployed

1 active deployment
Preview — 1caab6ea Deployed Aug 17, 2026 by vercel[bot]
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.

3 participants