Fleet UI: Use app context currentTeam as source of truth for teamId (#10118)

This commit is contained in:
RachelElysia 2023-02-27 12:06:18 -05:00 committed by GitHub
parent 593a64fde0
commit 1a37f9bf5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -0,0 +1 @@
* Fix bug to keep team when clicking on policy tab twice

View File

@ -68,9 +68,7 @@ const ManagePolicyPage = ({
} = useContext(AppContext);
const { renderFlash } = useContext(NotificationContext);
const teamId = location?.query?.team_id
? parseInt(location?.query?.team_id, 10)
: 0;
const teamId = currentTeam?.id || 0;
const {
setLastEditedQueryName,