mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 01:10:02 +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
|
// Filter themes based on query, tags, and date
|
||||||
const filteredThemes = themes.filter((theme) => {
|
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 =
|
const matchesTag =
|
||||||
tags.length === 0 ||
|
tags.length === 0 ||
|
||||||
(theme.tags && tags.some((tag) => theme.tags.includes(tag)));
|
(theme.tags && tags.some((tag) => theme.tags.includes(tag)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue