Skip to content

Commit

Permalink
Fixed menu for default tenant
Browse files Browse the repository at this point in the history
  • Loading branch information
axunonb committed Feb 11, 2022
1 parent 42bb5ce commit a5f54df
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
23 changes: 17 additions & 6 deletions League/Components/MainNavigationNodeBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,24 @@ protected virtual async Task CreateStandardNavigationNodes()
#endregion

Logger.LogTrace($"League standard list of {nameof(MainNavigationComponentModel.NavigationNode)}s created.");

NavigationNodes.AddRange(new List<MainNavigationComponentModel.NavigationNode>(new[]

if (TenantContext.IsDefault)
{
NavigationNodes.AddRange(new List<MainNavigationComponentModel.NavigationNode>(new[]
{
home, leagues,
new MainNavigationComponentModel.NavigationNode {Key = "RightAlignSeparator"},
}));
}
else
{
home, leagues, teamInfos, teamOverview, rankingTables,
new MainNavigationComponentModel.NavigationNode {Key = "RightAlignSeparator"},
account
}));
NavigationNodes.AddRange(new List<MainNavigationComponentModel.NavigationNode>(new[]
{
home, leagues, teamInfos, teamOverview, rankingTables,
new MainNavigationComponentModel.NavigationNode {Key = "RightAlignSeparator"},
account
}));
}
}
}
}
7 changes: 5 additions & 2 deletions LeagueDemo/ViewComponents/DemoMainNavigationNodeBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ protected override async Task CreateStandardNavigationNodes()
}
});

// Insert the individual node before the Top_Teams node
InsertTopNavigationNode(node, "Top_Teams");
if (!TenantContext.IsDefault)
{
// Insert the individual node before the Top_Teams node
InsertTopNavigationNode(node, "Top_Teams");
}
}
}
}

0 comments on commit a5f54df

Please sign in to comment.