I am retrieving data from an API and managing the loading of the data using a loader in my HTML. If the data array length is undefined, the data will be displayed. However, if there is no data, it continues to load indefinitely... My goal is to implement a timeout feature for situations where there is no data available. For example, after 10 seconds of waiting, I want to display a message like "No data found."
Check out my Vue.js template below: https://i.sstatic.net/5hdD8.png