mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
fix loadmore counter not resetting
- store load more counter in search store
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="grid">
|
||||
<AlbumCard
|
||||
v-for="album in search.albums.value"
|
||||
:key="album.image"
|
||||
:key="`${album.artist}-${album.title}`"
|
||||
:album="album"
|
||||
/>
|
||||
</div>
|
||||
@@ -18,11 +18,9 @@ import useSearchStore from "../../../stores/search";
|
||||
|
||||
const search = useSearchStore();
|
||||
|
||||
let counter = 0;
|
||||
|
||||
function loadMore() {
|
||||
counter += 6;
|
||||
search.loadAlbums(counter);
|
||||
search.updateLoadCounter("albums", 6);
|
||||
search.loadAlbums(search.loadCounter.albums);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user