Skip to content

Commit f9414d2

Browse files
committed
[dashboard] Fix top-level team selector state when in personal settings pages (including billing pages)
1 parent ba10bdc commit f9414d2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

components/dashboard/src/Menu.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,12 @@ export default function Menu() {
9797
// Hide most of the top menu when in a full-page form.
9898
const isMinimalUI = inResource(location.pathname, ["new", "teams/new", "open"]);
9999
const isWorkspacesUI = inResource(location.pathname, ["workspaces"]);
100-
const isAccountUI = inResource(location.pathname, [
100+
const isPersonalSettingsUI = inResource(location.pathname, [
101101
"account",
102102
"notifications",
103+
"billing",
104+
"plans",
105+
"teams",
103106
"variables",
104107
"keys",
105108
"integrations",
@@ -244,7 +247,7 @@ export default function Menu() {
244247
const onFeedbackFormClose = () => {
245248
setFeedbackFormVisible(false);
246249
};
247-
const isTeamLevelActive = !projectSlug && !isWorkspacesUI && !isAccountUI && !isAdminUI && teamOrUserSlug;
250+
const isTeamLevelActive = !projectSlug && !isWorkspacesUI && !isPersonalSettingsUI && !isAdminUI && teamOrUserSlug;
248251
const renderTeamMenu = () => {
249252
if (!teams || teams.length === 0) {
250253
return (
@@ -467,7 +470,7 @@ export default function Menu() {
467470
</div>
468471
{isFeedbackFormVisible && <FeedbackFormModal onClose={onFeedbackFormClose} />}
469472
</div>
470-
{!isMinimalUI && !prebuildId && !isWorkspacesUI && !isAccountUI && !isAdminUI && (
473+
{!isMinimalUI && !prebuildId && !isWorkspacesUI && !isPersonalSettingsUI && !isAdminUI && (
471474
<nav className="flex">
472475
{secondLevelMenu.map((entry: Entry) => (
473476
<TabMenuItem

0 commit comments

Comments
 (0)