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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

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 80.15% 3748 / 4676
🔵 Statements 79.45% 4076 / 5130
🔵 Functions 70.2% 1084 / 1544
🔵 Branches 61.55% 1697 / 2757
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react-app/src/main.tsx 0% 0% 0% 0% 12-40
react-app/src/router.tsx 85.71% 100% 0% 85.71% 137
react-app/src/components/TimeoutModal/index.tsx 90.9% 83.33% 83.33% 90.9% 40, 46
Generated in workflow #1599 for commit 5f51f1b by the Vitest Coverage Report Action

);
};

const publicRoutes = [
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@13bfrancis Can you review the public and private routes to make sure I got them right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I looked through and these routes look accurate :)

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

);
};

const publicRoutes = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

I looked through and these routes look accurate :)

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 👍

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