Enable searching by pack name

This commit is contained in:
Adele Reed 2023-06-23 13:04:20 -07:00
parent f59406a47a
commit cbbadac979
1 changed files with 1 additions and 0 deletions

View File

@ -109,6 +109,7 @@ class App extends Component {
const packsWithFilteredStickers = allPacks.map(pack => ({ const packsWithFilteredStickers = allPacks.map(pack => ({
...pack, ...pack,
stickers: pack.stickers.filter(sticker => stickers: pack.stickers.filter(sticker =>
sanitizeString(pack.title).includes(searchTerm) ||
sanitizeString(sticker.body).includes(searchTerm) || sanitizeString(sticker.body).includes(searchTerm) ||
sanitizeString(sticker.id).includes(searchTerm) sanitizeString(sticker.id).includes(searchTerm)
), ),