Skip to content

chore(site): refactor deployment values service to react-query #9669

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

Merged
merged 5 commits into from
Sep 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove duplicated use of usePermissions
  • Loading branch information
BrunoQuaresma committed Sep 14, 2023
commit d640c9c5afed5665e182166af425bf08c9165af5
4 changes: 1 addition & 3 deletions site/src/pages/UsersPage/UsersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,11 @@ export const UsersPage: FC<{ children?: ReactNode }> = () => {
paginationRef,
count,
} = usersState.context;
const permissions = usePermissions();

const { updateUsers: canEditUsers, viewDeploymentValues } = usePermissions();
const rolesQuery = useQuery({ ...roles(), enabled: canEditUsers });
const { data: deploymentValues } = useQuery({
...deploymentConfig(),
enabled: permissions.viewDeploymentValues,
enabled: viewDeploymentValues,
});
// Indicates if oidc roles are synced from the oidc idp.
// Assign 'false' if unknown.
Expand Down