Skip to content

Commit

Permalink
fix(ui): remove enterprise callout for enterprise user
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-gordon committed Dec 13, 2021
1 parent eecee77 commit 72f26ed
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/studio-be/src/studio/studio-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ export class StudioRouter extends CustomRouter {
window.WORKSPACE_ID = "${workspaceId}";
window.IS_BOT_MOUNTED = ${this.botService.isBotMounted(botId)};
window.SEGMENT_WRITE_KEY = "${segmentWriteKey}";
window.IS_PRO_ENABLED = "${process.IS_PRO_ENABLED}";
})(typeof window != 'undefined' ? window : {})
`

Expand Down
14 changes: 9 additions & 5 deletions packages/studio-ui/src/web/components/Layout/Toolbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ const Toolbar: FC<Props> = props => {
return (
<header className={style.toolbar}>
<div className={style.list}>
<Tooltip position="right-bottom" content={lang.tr('studio.flow.toolbar.salesCallToActionDescription')}>
<a className={style.cta_btn} target="_blank" href="https://botpress.com/free-trial?ref=bp-studio">
{lang.tr('studio.flow.toolbar.salesCallToAction')}
</a>
</Tooltip>
{window.IS_PRO_ENABLED ? (
<span />
) : (
<Tooltip position="right-bottom" content={lang.tr('studio.flow.toolbar.salesCallToActionDescription')}>
<a className={style.cta_btn} target="_blank" href="https://botpress.com/request-trial-from-app">
{lang.tr('studio.flow.toolbar.salesCallToAction')}
</a>
</Tooltip>
)}
<div>
{!!hasDoc && (
<Fragment>
Expand Down
2 changes: 1 addition & 1 deletion packages/studio-ui/src/web/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare global {
BOT_API_PATH: string
API_PATH: string
SEGMENT_WRITE_KEY: string

IS_PRO_ENABLED: boolean
ROOT_PATH: string
BOT_NAME: string
BOT_ID: string
Expand Down

0 comments on commit 72f26ed

Please sign in to comment.