fix(toolbar) disable the profile button based on the toolbar logic (#13696)

This commit is contained in:
Mihaela Dumitru
2023-08-14 09:45:07 +03:00
committed by GitHub
parent 934d7db24e
commit e2a02f4b21
5 changed files with 22 additions and 9 deletions

View File

@@ -16,8 +16,10 @@ import {
IDeeplinkingConfig,
IDeeplinkingMobileConfig,
IDeeplinkingPlatformConfig,
IMobileDynamicLink
IMobileDynamicLink,
ToolbarButton
} from './configType';
import { TOOLBAR_BUTTONS } from './constants';
import { _cleanupConfig, _setDeeplinkingDefaults } from './functions';
/**
@@ -546,6 +548,11 @@ function _translateLegacyConfig(oldValue: IConfig) {
};
}
if (oldValue.disableProfile) {
newValue.toolbarButtons = (newValue.toolbarButtons || TOOLBAR_BUTTONS)
.filter((button: ToolbarButton) => button !== 'profile');
}
_setDeeplinkingDefaults(newValue.deeplinking as IDeeplinkingConfig);
return newValue;