When a specific icon is clicked, an API call is triggered:
<i class="fas fa-sync" @click.prevent="updateCart(item.id, item.amount)"></i>
I am looking to add an animation to rotate the icon until the API call is complete or for two seconds. I'm not sure how to achieve this effect, so any solution would be greatly appreciated.