diff --git a/Composer/packages/client/src/App.tsx b/Composer/packages/client/src/App.tsx index d19e60f3d0..16adf915ae 100644 --- a/Composer/packages/client/src/App.tsx +++ b/Composer/packages/client/src/App.tsx @@ -19,63 +19,71 @@ initializeIcons(undefined, { disableWarnings: true }); // eslint-disable-next-line react/display-name const Content = forwardRef((props, ref) =>
); -const topLinks = (botLoaded: boolean) => [ - { - to: '/home', - iconName: 'Home', - labelName: 'Home', - activeIfUrlContains: 'home', - exact: true, - }, - { - to: '/dialogs/Main', - iconName: 'SplitObject', - labelName: 'Design Flow', - activeIfUrlContains: 'dialogs', - exact: false, - underTest: !botLoaded, - }, - { - to: '/test-conversation', - iconName: 'WaitListConfirm', - labelName: 'Test Conversation', - activeIfUrlContains: '', - exact: false, - underTest: true, // will delete - }, - { - to: 'language-generation/', - iconName: 'Robot', - labelName: 'Bot Says', - activeIfUrlContains: 'language-generation', - exact: false, - underTest: !botLoaded, - }, - { - to: 'language-understanding/', - iconName: 'People', - labelName: 'User Says', - activeIfUrlContains: 'language-understanding', - exact: false, - underTest: !botLoaded, - }, - { - to: '/evaluate-performance', - iconName: 'Chart', - labelName: 'Evaluate performance', - activeIfUrlContains: '', - exact: false, - underTest: true, // will delete - }, - { - to: '/setting/', - iconName: 'Settings', - labelName: 'Settings', - activeIfUrlContains: 'setting', - exact: false, - underTest: !botLoaded, - }, -]; +const topLinks = (botLoaded: boolean) => { + let links = [ + { + to: '/home', + iconName: 'Home', + labelName: 'Home', + activeIfUrlContains: 'home', + exact: true, + }, + { + to: '/dialogs/Main', + iconName: 'SplitObject', + labelName: 'Design Flow', + activeIfUrlContains: 'dialogs', + exact: false, + underTest: !botLoaded, + }, + { + to: '/test-conversation', + iconName: 'WaitListConfirm', + labelName: 'Test Conversation', + activeIfUrlContains: '', + exact: false, + underTest: true, // will delete + }, + { + to: 'language-generation/', + iconName: 'Robot', + labelName: 'Bot Says', + activeIfUrlContains: 'language-generation', + exact: false, + underTest: !botLoaded, + }, + { + to: 'language-understanding/', + iconName: 'People', + labelName: 'User Says', + activeIfUrlContains: 'language-understanding', + exact: false, + underTest: !botLoaded, + }, + { + to: '/evaluate-performance', + iconName: 'Chart', + labelName: 'Evaluate performance', + activeIfUrlContains: '', + exact: false, + underTest: true, // will delete + }, + { + to: '/setting/', + iconName: 'Settings', + labelName: 'Settings', + activeIfUrlContains: 'setting', + exact: false, + underTest: !botLoaded, + }, + ]; + + if (process.env.COMPOSER_AUTH_PROVIDER === 'abs-h') { + links = links.filter(link => link.to !== '/home'); + } + + return links; +}; const bottomLinks = [ { diff --git a/Composer/packages/client/src/TestController.tsx b/Composer/packages/client/src/TestController.tsx index f8056f7642..1958342c1d 100644 --- a/Composer/packages/client/src/TestController.tsx +++ b/Composer/packages/client/src/TestController.tsx @@ -13,7 +13,7 @@ import formatMessage from 'format-message'; import settingsStorage from './utils/dialogSettingStorage'; import { StoreContext } from './store'; import { bot, botButton, calloutLabel, calloutDescription, calloutContainer } from './styles'; -import { BASEPATH, BotStatus, LuisConfig, Text } from './constants'; +import { BotStatus, LuisConfig, Text } from './constants'; import { PublishLuisDialog } from './publishDialog'; import { OpenAlertModal, DialogStyle } from './components/Modal'; import { getReferredFiles } from './utils/luUtil'; @@ -37,7 +37,7 @@ const STATE = { SUCCESS: 2, }; -const isAbsHosted = () => BASEPATH !== '' && BASEPATH !== '/'; +const isAbsHosted = () => process.env.COMPOSER_AUTH_PROVIDER === 'abs-h'; export const TestController: React.FC = () => { const { state, actions } = useContext(StoreContext);