Skip to content

Commit

Permalink
Add toast
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolaus-B committed Nov 10, 2023
1 parent 3b6674a commit 9d8b174
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export class App extends Component {
this.setState(prevState => ({
images: [...prevState.images, ...newImages],
}));
if (this.state.images) {
toast.error('Non-existing search query');
}
} catch (err) {
this.setState({ error: true });
} finally {
Expand Down

0 comments on commit 9d8b174

Please sign in to comment.