diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index 9910bf1c50..e068ac32f7 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -729,6 +729,7 @@ const _ProjectController = { referal_id: user.referal_id, signUpDate: user.signUpDate, allowedFreeTrial, + hasRecurlySubscription: subscription?.recurlySubscription_id != null, featureSwitches: user.featureSwitches, features: user.features, featureUsage, diff --git a/services/web/frontend/js/features/subscription/components/dashboard/free-plan.tsx b/services/web/frontend/js/features/subscription/components/dashboard/free-plan.tsx index bb670e19a5..ce4c2baaa5 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/free-plan.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/free-plan.tsx @@ -1,6 +1,4 @@ import { useTranslation, Trans } from 'react-i18next' -import { isSplitTestEnabled } from '@/utils/splitTestUtils' -import { AI_STANDALONE_PLAN_CODE } from '../../data/add-on-codes' function FreePlan() { const { t } = useTranslation() @@ -28,14 +26,6 @@ function FreePlan() { {t('upgrade_now')} - {isSplitTestEnabled('ai-add-on') && ( - - {t('buy_overleaf_assist')} - - )} ) } diff --git a/services/web/frontend/js/features/subscription/components/dashboard/states/active/active.tsx b/services/web/frontend/js/features/subscription/components/dashboard/states/active/active.tsx index 98b9ea5dc1..b24a71113e 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/states/active/active.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/states/active/active.tsx @@ -15,8 +15,6 @@ import { ConfirmChangePlanModal } from './change-plan/modals/confirm-change-plan import { KeepCurrentPlanModal } from './change-plan/modals/keep-current-plan-modal' import { ChangeToGroupModal } from './change-plan/modals/change-to-group-modal' import OLButton from '@/features/ui/components/ol/ol-button' -import { BuyAiAddOnButton } from './change-plan/buy-ai-add-on-button' -import { isSplitTestEnabled } from '@/utils/splitTestUtils' export function ActiveSubscription({ subscription, @@ -29,8 +27,6 @@ export function ActiveSubscription({ if (showCancellation) return - const aiAddOnAvailable = isSplitTestEnabled('ai-add-on') - return ( <>

@@ -149,8 +145,6 @@ export function ActiveSubscription({ - {/* to be removed once we have purchasing options ready */} - {aiAddOnAvailable && } ) } diff --git a/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/buy-ai-add-on-button.tsx b/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/buy-ai-add-on-button.tsx deleted file mode 100644 index 9be397135c..0000000000 --- a/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/buy-ai-add-on-button.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { Button } from 'react-bootstrap' -import { postJSON } from '@/infrastructure/fetch-json' -import { AI_ADD_ON_CODE } from '../../../../../data/add-on-codes' - -export function BuyAiAddOnButton() { - const addAiAddon = async () => { - await postJSON(`/user/subscription/addon/${AI_ADD_ON_CODE}/add`) - location.reload() - } - - return -} diff --git a/services/web/types/user.ts b/services/web/types/user.ts index dd176bdd0e..0aec6c73d6 100644 --- a/services/web/types/user.ts +++ b/services/web/types/user.ts @@ -37,6 +37,7 @@ export type User = { isAdmin?: boolean email: string allowedFreeTrial?: boolean + hasRecurlySubscription?: boolean first_name?: string last_name?: string alphaProgram?: boolean