corrected prop setting order

This commit is contained in:
Abhinav-grd 2021-03-18 22:45:26 +05:30
parent 80a95e214f
commit 94f695e0b5

View file

@ -65,16 +65,16 @@ export default function Sidebar(props: Props) {
const cancelSubscription = async () => {
try {
await billingService.cancelSubscription();
props.setBannerMessage({
message: constants.SUBSCRIPTION_CANCEL_SUCCESS,
variant: 'secondary',
});
} catch (e) {
props.setBannerMessage({
message: constants.SUBSCRIPTION_CANCEL_FAILED,
variant: 'danger',
});
}
props.setBannerMessage({
message: constants.SUBSCRIPTION_CANCEL_SUCCESS,
variant: 'secondary',
});
setConfirmModalView(false);
setIsOpen(false);
};