fix inspiration selector
This commit is contained in:
parent
3b86363637
commit
13592a5869
2 changed files with 6 additions and 3 deletions
|
|
@ -59,9 +59,13 @@ const tabs = computed(() => {
|
|||
];
|
||||
});
|
||||
|
||||
const allImages = page.value.inspirations.flatMap(
|
||||
(inspiration) => inspiration.media
|
||||
);
|
||||
|
||||
const currentInspiration = ref(page.value.inspirations[0]);
|
||||
const favoriteImages = computed(() => {
|
||||
return currentInspiration.value.media.filter(
|
||||
return allImages.filter(
|
||||
(image) => image.favoriteForUsers?.includes(user.uuid) ?? false
|
||||
);
|
||||
});
|
||||
|
|
@ -71,7 +75,6 @@ function changeTab(newValue) {
|
|||
}
|
||||
|
||||
function changeInspiration(newValue) {
|
||||
console.log(newValue);
|
||||
currentInspiration.value = newValue;
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue