Skip to content

Commit

Permalink
Merge pull request #109 from HE-Arc/sp-108-correcting-bug-random-cate…
Browse files Browse the repository at this point in the history
…gorie

Sp 108 correcting bug random categorie
  • Loading branch information
Krucksy authored Apr 11, 2024
2 parents 03c3a75 + cacc62a commit 677866f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion frontend/src/components/CategorieBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const props = defineProps({
})
onMounted(async () => {
console.log(props.id_category);
imageData.value = await APIClient.getImageCategory(props.id_category);
imageLoaded.value = true;
});
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ const randomId = ref(0);
onMounted(async () => {
categories.value = await APIClient.getCategories();
// get a random category id for the random category button
randomId.value = Math.floor(Math.random() * Object.keys(categories.value).length);
randomId.value = Math.floor(Math.random() * Object.keys(categories.value).length) + 1;
});
</script>

Expand Down

0 comments on commit 677866f

Please sign in to comment.