)
            .then(response => response.json())
            .then(data => this.trendingGifs = data.data);
        },
        searchGifs: function() {
          const url = `${this.apiUrl}/search?api_key=${this.apiKey}&q=${this.query}&limit=8`;

          fetch(url)
            .then(response => response.json())
            .then(data => this.searchedGifs = data.data);
        }
      },

      created: function() {
        this.fetchTrendingGifs();
      }
    });
  </script>
</body>
</html>