You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[TOOL-4366] Redirect /team to last visited team (#6938)
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR updates the team management functionality in the `TeamRootPage` component by replacing the method for retrieving the team with a new function that checks for the last visited team or defaults to a standard team. This improves user experience by remembering the last team visited.
### Detailed summary
- Replaced `getDefaultTeam` with `getLastVisitedTeamOrDefaultTeam` in `TeamRootPage`.
- Updated the condition to check if a team is available.
- Changed the redirect URL to use the slug of the newly retrieved `team`.
- Added `getLastVisitedTeamOrDefaultTeam` function in `team.ts` to handle team retrieval logic using cookies.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
0 commit comments