OspreyFly / fuzzy-phids-frontend

0 stars 0 forks source link

Checking out order goes to loading page #3

Closed CodyTVWeber closed 2 months ago

CodyTVWeber commented 2 months ago

When submitting the checkout, the page goes to loading. This seems to be an undesirable state. The users will likely be confused and may even believe the order was not made.

OspreyFly commented 2 months ago

My solution is to redirect the user back to the insect shopping view and clear the cart. An integrated checkout API would be the ideal page to navigate to next in a future version. I also included messages about the order if it is not successful and if it is a duplicate order that has been denied.

CodyTVWeber commented 2 months ago

Would it be easy to add a success alert/notification if the order is created?

OspreyFly commented 2 months ago

I added an alert call that pauses execution and notifies user that their order was successful. When they click ok it continues to redirect them to the store like before.

CodyTVWeber commented 2 months ago

Looks fixed!