diff --git a/frontend/app/Router.js b/frontend/app/Router.js index e8fa64eab..d150ba28a 100644 --- a/frontend/app/Router.js +++ b/frontend/app/Router.js @@ -16,12 +16,13 @@ import { withStore } from 'App/mstore'; import APIClient from './api_client'; import * as routes from './routes'; -import { OB_DEFAULT_TAB } from 'App/routes'; +import { OB_DEFAULT_TAB, isRoute } from 'App/routes'; import Signup from './components/Signup/Signup'; import { fetchTenants } from 'Duck/user'; import { setSessionPath } from 'Duck/sessions'; import { ModalProvider } from './components/Modal'; import { GLOBAL_DESTINATION_PATH } from 'App/constants/storageKeys'; +import SupportCallout from 'Shared/SupportCallout'; const Login = lazy(() => import('Components/Login/Login')); const ForgotPassword = lazy(() => import('Components/ForgotPassword/ForgotPassword')); @@ -103,6 +104,7 @@ const ONBOARDING_REDIRECT_PATH = routes.onboarding(OB_DEFAULT_TAB); tenants: state.getIn(['user', 'tenants']), existingTenant: state.getIn(['user', 'authDetails', 'tenants']), onboarding: state.getIn(['user', 'onboarding']), + isEnterprise: state.getIn(['user', 'account', 'edition']) === 'ee' || state.getIn(['user', 'authDetails', 'edition']) === 'ee', }; }, { @@ -171,9 +173,10 @@ class Router extends React.Component { } render() { - const { isLoggedIn, jwt, siteId, sites, loading, changePassword, location, existingTenant, onboarding } = this.props; + const { isLoggedIn, jwt, siteId, sites, loading, changePassword, location, existingTenant, onboarding, isEnterprise } = this.props; const siteIdList = sites.map(({ id }) => id).toJS(); const hideHeader = (location.pathname && location.pathname.includes('/session/')) || location.pathname.includes('/assist/'); + const isPlayer = isRoute(SESSION_PATH, location.pathname); return isLoggedIn ? ( @@ -230,6 +233,7 @@ class Router extends React.Component { + {!isEnterprise && !isPlayer && } ) : ( }> @@ -239,6 +243,7 @@ class Router extends React.Component { {!existingTenant && } + {!isEnterprise && } ); } diff --git a/frontend/app/components/shared/SupportCallout/SupportCallout.tsx b/frontend/app/components/shared/SupportCallout/SupportCallout.tsx new file mode 100644 index 000000000..951c98274 --- /dev/null +++ b/frontend/app/components/shared/SupportCallout/SupportCallout.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import SlackIcon from '../../../svg/integrations/slack.svg'; +import { Popup } from 'UI'; + +function SupportCallout() { + return ( + + +
+ +
+
+
+ ); +} + +export default SupportCallout; diff --git a/frontend/app/components/shared/SupportCallout/index.ts b/frontend/app/components/shared/SupportCallout/index.ts new file mode 100644 index 000000000..76db66d7a --- /dev/null +++ b/frontend/app/components/shared/SupportCallout/index.ts @@ -0,0 +1 @@ +export { default } from './SupportCallout'; \ No newline at end of file