Skip to content

Commit

Permalink
Fix a hook usage violation (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
eabruzzese authored Dec 30, 2024
1 parent d1538e0 commit c4dfa5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ui/layouts/app-detail-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ function AppPageHeader() {
const crumbs = [
{ name: environment.handle, to: environmentAppsUrl(environment.id) },
];
const hasBetaFeatures =
useSelector(selectHasBetaFeatures) || useSelector(selectIsImpersonated);
const isImpersonated = useSelector(selectIsImpersonated);
const hasBetaFeatures = useSelector(selectHasBetaFeatures) || isImpersonated;
const hasConfigAccess = useSelector((s) =>
selectUserHasPerms(s, { envId: app.environmentId, scope: "read" }),
);
Expand Down
4 changes: 2 additions & 2 deletions src/ui/shared/application-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export const ApplicationSidebar = () => {
const hasSystemStatus =
systemStatus?.description && systemStatus?.indicator !== "none";
const navigate = useNavigate();
const hasBetaFeatures =
useSelector(selectHasBetaFeatures) || useSelector(selectIsImpersonated);
const isImpersonated = useSelector(selectIsImpersonated);
const hasBetaFeatures = useSelector(selectHasBetaFeatures) || isImpersonated;
const navigation = [
{ name: "Stacks", to: stacksUrl(), icon: <IconLayers /> },
{ name: "Environments", to: environmentsUrl(), icon: <IconGlobe /> },
Expand Down

0 comments on commit c4dfa5b

Please sign in to comment.