In my application, users can choose from four different types of plans that are retrieved from the backend. Once a plan is selected, they are directed to a payment page. The pricing table page can be revisited, and if a user has already purchased a plan, the button text will change to "cancel subscription." I have been able to dynamically change the button text for all plans except when a subscription is canceled.
Although I have provided a link to a StackBlitz example, it may not fully demonstrate the functionality due to data being fetched from the backend. StackBlitz
I am looking for a solution to revert the button text back to 'Choose Plan' after a user cancels their subscription.