Fixing race condition where user could navigate away from recent or view page before api request responds