diff --git a/src/components/App.jsx b/src/components/App.jsx index cfbf2c8..59d784d 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -24,7 +24,7 @@ class App extends Component { currentPage: 1, isLoading: false, error: null, - totalHits: 0, + totalHits: null, }; } @@ -91,24 +91,23 @@ class App extends Component { {isLoading && } {error && } - {images.length > 0 && !error ? ( + {images.length > 0 && !error && ( <> - - {totalHits > images.length && ( )} - ) : images.length === 0 && searchQuery && !error ? ( + )} + {!error && searchQuery && totalHits === 0 && ( - ) : ( - !error && )} + + {!searchQuery && } );