From d47b032a8750d318885774e26a42d6e63ba9805c Mon Sep 17 00:00:00 2001 From: Leoh Date: Fri, 15 Oct 2021 17:38:57 +0530 Subject: [PATCH] Fixed error handling in API calls --- view/App.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/view/App.tsx b/view/App.tsx index ab2d596..5fcf46d 100644 --- a/view/App.tsx +++ b/view/App.tsx @@ -100,10 +100,9 @@ class App extends React.Component { } render(){ - // if(this.state.error) - // return(
Loading....
) - // else if(this.state.isLoaded) - if (!this.state.isLoaded) + if(this.state.error) + return(
Loading....
) + else if(!this.state.isLoaded) return
Loading....
else { return (