Bugfix: Filter on band page changes visible bands on home page

This commit is contained in:
2025-08-31 11:47:56 +02:00
parent 2fd045c590
commit d730280876
2 changed files with 8 additions and 3 deletions

View File

@@ -12,6 +12,9 @@ export const useBandStore = defineStore("bandStore", {
/** All available bands */
bands: ref<Array<BandApiModel>>([]),
/** Available bands filtered by parameters */
filteredBands: ref<Array<BandApiModel>>([]),
/** All information about a single band */
band: ref<BandDetailsApiModel>(new BandDetailsApiModel()),
@@ -32,7 +35,9 @@ export const useBandStore = defineStore("bandStore", {
await fetchAllBands()
.then(result => {
this.bands = result.data.filter((band: BandApiModel) => {
this.bands = result.data
this.filteredBands = result.data.filter((band: BandApiModel) => {
if (genreStore.genre == null) {
return true
}