Skip to content

Commit

Permalink
fix: addEventList corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
stritti committed Jan 22, 2024
1 parent 6730413 commit 6a776b2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/stores/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@ export const useSeachStore = defineStore('search', {
this.searchList = []
},
addEventList(list: EventItem[]) {
let searchItem: SearchItem


list.forEach(eventItem => {

searchItem.id = eventItem.id
searchItem.type = 'event'
searchItem.title = eventItem.name
searchItem.searchContent = Object.values(eventItem).join(", ").toLocaleLowerCase()
const searchItem: SearchItem = {
id: eventItem.id,
type: 'event',
title: eventItem.name,
searchContent: Object.values(eventItem).join(", ").toLocaleLowerCase()
}

this.searchList.push(searchItem)
});
}

}
})

0 comments on commit 6a776b2

Please sign in to comment.