diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index c6e3a139cc..05c256ca1d 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -2420,7 +2420,6 @@ "you_cant_add_or_change_password_due_to_sso": "", "you_cant_join_this_group_subscription": "", "you_currently_have_x_linked_with_your_overleaf_account": "", - "you_dont_have_any_add_ons_on_your_account": "", "you_dont_have_any_repositories": "", "you_have_1_license_and_your_plan_supports_up_to_y": "", "you_have_added_x_of_group_size_y": "", 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 12407e0c8e..6a936a9b55 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 @@ -283,7 +283,6 @@ export function ActiveSubscription({ cancelPauseReq={cancelPauseReq} /> )} -
0) || hasAiAssistViaWritefull + + if (!hasAddons) { + return null + } + return ( <> +

{t('add_ons')}

- {hasAddons ? ( - <> - {addOnsToDisplay?.map(addOn => ( - pendingAddOn.code !== addOn.addOnCode - ) - } - displayPrice={addOnsDisplayPrices[addOn.addOnCode]} - nextBillingDate={subscription.payment.nextPaymentDueDate} - /> - ))} - {hasAiAssistViaWritefull && } - - ) : ( -

{t('you_dont_have_any_add_ons_on_your_account')}

- )} + {addOnsToDisplay?.map(addOn => ( + pendingAddOn.code !== addOn.addOnCode + ) + } + displayPrice={addOnsDisplayPrices[addOn.addOnCode]} + nextBillingDate={subscription.payment.nextPaymentDueDate} + /> + ))} + {hasAiAssistViaWritefull && } ) } diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 9676f038fa..b2d3ee5f63 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -3083,7 +3083,6 @@ "you_cant_join_this_group_subscription": "You can’t join this group subscription", "you_cant_reset_password_due_to_sso": "You can’t reset your password because your group or organization uses SSO. <0>Log in with SSO.", "you_currently_have_x_linked_with_your_overleaf_account": "You currently have <0>__managers__ linked with your __appName__ account.", - "you_dont_have_any_add_ons_on_your_account": "You don’t have any add-ons on your account.", "you_dont_have_any_repositories": "You don’t have any repositories", "you_have_1_license_and_your_plan_supports_up_to_y": "You have allocated 1 license and your plan supports up to __groupSize__.", "you_have_added_x_of_group_size_y": "You have added <0>__addedUsersSize__ of <1>__groupSize__ available members", diff --git a/services/web/locales/zh-CN.json b/services/web/locales/zh-CN.json index aec70688b6..0a8a444c5a 100644 --- a/services/web/locales/zh-CN.json +++ b/services/web/locales/zh-CN.json @@ -2449,7 +2449,6 @@ "you_cant_add_or_change_password_due_to_sso": "您无法添加或更改密码,因为您的群组或组织使用<0>单点登录 (SSO)。", "you_cant_join_this_group_subscription": "您无法加入此团队订阅", "you_cant_reset_password_due_to_sso": "您无法重置密码,因为您的群组或组织使用 SSO。 <0>使用单点登录登录。", - "you_dont_have_any_add_ons_on_your_account": "您的帐户中没有任何附加组件。", "you_dont_have_any_repositories": "您没有任何仓库", "you_have_1_license_and_your_plan_supports_up_to_y": "您有 1 个许可证并且您的计划最多支持 __groupSize__。", "you_have_added_x_of_group_size_y": "您已经添加 <0>__addedUsersSize__ / <1>__groupSize__ 个可用成员。", diff --git a/services/web/test/frontend/features/subscription/components/dashboard/states/active/active.test.tsx b/services/web/test/frontend/features/subscription/components/dashboard/states/active/active.test.tsx index 43bf25b6e4..b7daf6b80d 100644 --- a/services/web/test/frontend/features/subscription/components/dashboard/states/active/active.test.tsx +++ b/services/web/test/frontend/features/subscription/components/dashboard/states/active/active.test.tsx @@ -224,9 +224,9 @@ describe('', function () { screen.getByText('AI Assist') }) - it('shows empty add-ons message if none present', function () { + it('hides the add-ons section when none are present', function () { renderActiveSubscription(annualActiveSubscription) - screen.getByText(/You don’t have any add-ons on your account/i) + expect(screen.queryByRole('heading', { name: 'Add-ons' })).to.be.null }) it('shows multiple active coupons', function () {