Skip to content

Commit

Permalink
[dashboard] Fix top-level team selector state when in personal settin…
Browse files Browse the repository at this point in the history
…gs pages (including billing pages)
  • Loading branch information
jankeromnes committed Oct 7, 2022
1 parent ba10bdc commit f9414d2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions components/dashboard/src/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,12 @@ export default function Menu() {
// Hide most of the top menu when in a full-page form.
const isMinimalUI = inResource(location.pathname, ["new", "teams/new", "open"]);
const isWorkspacesUI = inResource(location.pathname, ["workspaces"]);
const isAccountUI = inResource(location.pathname, [
const isPersonalSettingsUI = inResource(location.pathname, [
"account",
"notifications",
"billing",
"plans",
"teams",
"variables",
"keys",
"integrations",
Expand Down Expand Up @@ -244,7 +247,7 @@ export default function Menu() {
const onFeedbackFormClose = () => {
setFeedbackFormVisible(false);
};
const isTeamLevelActive = !projectSlug && !isWorkspacesUI && !isAccountUI && !isAdminUI && teamOrUserSlug;
const isTeamLevelActive = !projectSlug && !isWorkspacesUI && !isPersonalSettingsUI && !isAdminUI && teamOrUserSlug;
const renderTeamMenu = () => {
if (!teams || teams.length === 0) {
return (
Expand Down Expand Up @@ -467,7 +470,7 @@ export default function Menu() {
</div>
{isFeedbackFormVisible && <FeedbackFormModal onClose={onFeedbackFormClose} />}
</div>
{!isMinimalUI && !prebuildId && !isWorkspacesUI && !isAccountUI && !isAdminUI && (
{!isMinimalUI && !prebuildId && !isWorkspacesUI && !isPersonalSettingsUI && !isAdminUI && (
<nav className="flex">
{secondLevelMenu.map((entry: Entry) => (
<TabMenuItem
Expand Down

0 comments on commit f9414d2

Please sign in to comment.