So each Order Details component has its own data that comes from the Order List. This data is used as a reference to display the details of a specific order transaction. Thus, the data that would be displayed in the Order Details component will be based on the data that was passed from the Order List.
Due to this kind of data structure, it has become a bug for the Order Details component to implement the order status update. It's true that the function is working properly and it does update the database for that order. However, the problem is that it doesn't update the original data that was passed to the Order Details component. So, if the user will refresh the component after updating the order status, it will still display the outdated data that comes from the Order List instead of the new data from the server.
So each Order Details component has its own data that comes from the Order List. This data is used as a reference to display the details of a specific order transaction. Thus, the data that would be displayed in the Order Details component will be based on the data that was passed from the Order List. Due to this kind of data structure, it has become a bug for the Order Details component to implement the order status update. It's true that the function is working properly and it does update the database for that order. However, the problem is that it doesn't update the original data that was passed to the Order Details component. So, if the user will refresh the component after updating the order status, it will still display the outdated data that comes from the Order List instead of the new data from the server.
Possible fix: