Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
update viewlets add
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiggr committed Sep 13, 2022
1 parent b390365 commit a9d26a4
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/localconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,19 @@ function addCustomGroup(config) {
}
}

function addViewlets(config) {
if (config.viewlets && config.viewlets.length > 0) {
config.viewlets.push({ path: '/', component: ForestMetadata });
}
if (!config.viewlets) {
config.viewlets = [{ path: '/', component: ForestMetadata }];
}
}

export function applyConfig(config) {
addCustomGroup(config);
addViewlets(config);

config.settings = {
...config.settings,
navDepth: 4,
Expand Down Expand Up @@ -148,10 +159,10 @@ export function applyConfig(config) {
},
};

config.viewlets = [
...config.viewlets,
{ path: '/', component: ForestMetadata },
];
// config.viewlets = [
// ...config.viewlets,
// { path: '/', component: ForestMetadata },
// ];

config.settings.plotlyCustomColors = [
{
Expand Down

0 comments on commit a9d26a4

Please sign in to comment.