Skip to content

Commit

Permalink
Test giphy search on IOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
theTyster committed Oct 25, 2023
1 parent e1d67dd commit 0b60988
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions public/Giphy Search/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ $("form").on("submit", async function (e) {
.get(
`http://api.giphy.com/v1/gifs/search?q=${query}&api_key=MhAodEJIJxQMxW9XqxKjyXfNYdLoOIym`,
)
.catch(async () => {
.catch(async (e) => {
$(
"<p class='error'> There was an error. Please, try again. </p>",
`<p class='error'> There was an error.(${e}) Please, try again. </p>`,
).appendTo("h1");
await new Promise((r) => setTimeout(() => r(), 4000)); // custom sleep function
$("p.error").remove();
});
console.log(request);
request = request.data.data;
request.map((e) =>
$("div.container.gifs").append(
Expand Down

0 comments on commit 0b60988

Please sign in to comment.