Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

FroeMic
Copy link
Contributor

@FroeMic FroeMic commented Sep 22, 2025

What does this PR do?

This PR hides the promotion code view and button (BillingDiscountView component) for users on the Hobby plan. This ensures that discount-related UI elements are only displayed to users with an active paid subscription, aligning the UI with the new billing setup. The component now returns null if organization?.cloudConfig?.stripe?.activeSubscriptionId is not set.

Fixes # GTM-1441

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • This change requires a documentation update

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project (pnpm run format)
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my PR needs changes to the documentation
  • I haven't checked if my changes generate no new warnings (npm run lint)
  • I haven't added tests that prove my fix is effective or that my feature works
  • I haven't checked if new and existing unit tests pass locally with my changes

Linear Issue: GTM-1441

Open in Cursor Open in Web


Important

Hide promotion code view and button in BillingDiscountView for Hobby plan users by checking active subscription ID.

  • Behavior:
    • BillingDiscountView component now returns null if organization?.cloudConfig?.stripe?.activeSubscriptionId is not set, hiding promotion code view and button for Hobby plan users.
  • Logic:
    • Checks organization?.cloudConfig?.stripe?.activeSubscriptionId to determine if the user is on a paid plan.
  • UI:
    • Promotion code view and button are only displayed for users with an active paid subscription.

This description was created by Ellipsis for e720089. You can customize this summary. It will automatically update as commits are pushed.

Copy link

cursor bot commented Sep 22, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@FroeMic FroeMic marked this pull request as ready for review September 22, 2025 09:22
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Sep 22, 2025
@FroeMic FroeMic changed the title Hide promotion code for hobby plan users fix(billing): Hide promotion code for hobby plan users Sep 22, 2025
@dosubot dosubot bot added the ui label Sep 22, 2025
@FroeMic FroeMic enabled auto-merge September 22, 2025 09:24
@dosubot dosubot bot added the auto-merge This PR is set to be merged label Sep 22, 2025
@FroeMic FroeMic disabled auto-merge September 22, 2025 09:35
@dosubot dosubot bot removed the auto-merge This PR is set to be merged label Sep 22, 2025
@FroeMic FroeMic enabled auto-merge September 22, 2025 09:35
@dosubot dosubot bot added the auto-merge This PR is set to be merged label Sep 22, 2025
@FroeMic FroeMic disabled auto-merge September 22, 2025 10:05
@dosubot dosubot bot removed the auto-merge This PR is set to be merged label Sep 22, 2025
@FroeMic FroeMic merged commit ea71c40 into main Sep 22, 2025
27 of 29 checks passed
@FroeMic FroeMic deleted the cursor/GTM-1441-hide-promotion-code-for-hobby-plan-users-cff9 branch September 22, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files. ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants