mirror of
https://github.com/zen-browser/www.git
synced 2025-07-07 17:05:32 +02:00
Feat: search description and title when searching for mods (#297)
This commit is contained in:
parent
3e300f3756
commit
b90d5092a7
1 changed files with 3 additions and 1 deletions
|
@ -138,7 +138,9 @@ export function getThemesFromSearch(
|
|||
|
||||
// Filter themes based on query, tags, and date
|
||||
const filteredThemes = themes.filter((theme) => {
|
||||
const matchesQuery = theme.name.toLowerCase().includes(normalizedQuery);
|
||||
const titleMatchesQuery = theme.name.toLowerCase().includes(normalizedQuery);
|
||||
const descriptionMatchesQuery = theme.description.toLowerCase().includes(normalizedQuery);
|
||||
const matchesQuery = titleMatchesQuery || descriptionMatchesQuery;
|
||||
const matchesTag =
|
||||
tags.length === 0 ||
|
||||
(theme.tags && tags.some((tag) => theme.tags.includes(tag)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue