Skip to content

Commit

Permalink
fix: disable change subscription button when subscription is cancelle…
Browse files Browse the repository at this point in the history
…d and can't renew
  • Loading branch information
naumovski-filip committed Jul 6, 2023
1 parent 7d824dd commit be09ba2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Payment/Payment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ const Payment = ({
<Button
className={styles.upgradeSubscription}
label={t('user:payment.change_subscription')}
disabled={!canRenewSubscription && activeSubscription.status === 'cancelled'}
onClick={() => {
if (offers.length > 1 && !canRenewSubscription) {
setIsChangingOffer(true);
Expand Down
1 change: 1 addition & 0 deletions src/pages/User/__snapshots__/User.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ exports[`User Component tests > Payments Page 1`] = `
</p>
</div>
<button
aria-disabled="false"
class="_button_f8f296 _upgradeSubscription_c57ff5 _primary_f8f296 _outlined_f8f296"
data-testid="change-subscription-button"
>
Expand Down

0 comments on commit be09ba2

Please sign in to comment.