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

feat(ui): No longer trigger the <TimeoutModal> on "public" pages #1052

Merged
merged 18 commits into from
Jan 24, 2025

Conversation

tbolt
Copy link
Collaborator

@tbolt tbolt commented Jan 22, 2025

🎫 Linked Ticket

OY2-31419

💬 Description / Notes

Updates routes to utilize a "Public" and "Private" pattern. Even though private routes aren't actually enforcing authentication they will log out a user after a period of time. I put a comment in the code to reflect this:

// These routes are divided into public and private, but this distinction
// is not used for enforcing authentication. Instead, private routes include
// a Timeout component that logs out a user after a period of inactivity.

🛠 Changes

  • Moved <TimeoutModal> from src/main.tsx to src/router.tsx and only included the <TimeoutModal> for routes that are behind authentication.

Copy link
Contributor

github-actions bot commented Jan 22, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 85.63% 4019 / 4693
🔵 Statements 85.06% 4380 / 5149
🔵 Functions 76.7% 1189 / 1550
🔵 Branches 69.71% 1941 / 2784
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react-app/src/router.tsx 75% 100% 0% 75% 130
react-app/src/components/TimeoutModal/index.tsx 90.9% 83.33% 83.33% 90.9% 40, 46
Generated in workflow #1676 for commit 77ca522 by the Vitest Coverage Report Action

react-app/src/router.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@13bfrancis 13bfrancis left a comment

Choose a reason for hiding this comment

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

Looks like you just need to fix some tests. Do that and I can re-review and approve your PR

react-app/src/router.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@tiffanyvu tiffanyvu left a comment

Choose a reason for hiding this comment

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

Aside from the test error, looks great 👍

Copy link
Contributor

🎉 This PR is included in version 1.5.0-val.114 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants