diff --git a/static/js/updateBreedingUsage.js b/static/js/updateBreedingUsage.js index e7bddf9..31a5972 100644 --- a/static/js/updateBreedingUsage.js +++ b/static/js/updateBreedingUsage.js @@ -1,32 +1,39 @@ function updateBreedingUsage() { - // Get the selected monster from the dropdown - var selectedMonster = document.getElementById("monsterDropdown").value; + // Get the selected monster from the dropdown + var selectedMonster = document.getElementById("monsterDropdown").value; - // Fetch data from the API - fetch(`/api/breeding/usage/${selectedMonster}`) + // Fetch data from the API + fetch(`/api/breeding/usage/${selectedMonster}`) .then(response => response.json()) .then(data => { - // Update the HTML with the list of offspring monsters - renderOffspringList(data.used_in); + // Update the HTML with the list of offspring monsters + renderOffspringList(data.used_in); }) .catch(error => console.error('Error fetching data:', error)); - } +} - function renderOffspringList(usageData) { - var offspringContainer = document.getElementById("offspringContainer"); +function renderOffspringList(usageData) { + var offspringContainer = document.getElementById("offspringContainer"); - // Clear previous HTML content - offspringContainer.innerHTML = "