mirror of
https://github.com/shadoll/sLogos.git
synced 2025-12-20 08:30:59 +00:00
feat: Enhance search functionality to include logo metadata
This commit is contained in:
@@ -83,7 +83,10 @@
|
|||||||
const matchesSearch =
|
const matchesSearch =
|
||||||
logo.name.toLowerCase().includes(val.toLowerCase()) ||
|
logo.name.toLowerCase().includes(val.toLowerCase()) ||
|
||||||
(logo.title && logo.title.toLowerCase().includes(val.toLowerCase())) ||
|
(logo.title && logo.title.toLowerCase().includes(val.toLowerCase())) ||
|
||||||
(logo.brand && logo.brand.toLowerCase().includes(val.toLowerCase()));
|
(logo.brand && logo.brand.toLowerCase().includes(val.toLowerCase())) ||
|
||||||
|
(logo.meta && Object.values(logo.meta).some(
|
||||||
|
v => typeof v === 'string' && v.toLowerCase().includes(val.toLowerCase())
|
||||||
|
));
|
||||||
const matchesTags =
|
const matchesTags =
|
||||||
!selectedTags.length ||
|
!selectedTags.length ||
|
||||||
(logo.tags &&
|
(logo.tags &&
|
||||||
@@ -308,8 +311,10 @@
|
|||||||
const matchesSearch =
|
const matchesSearch =
|
||||||
logo.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
logo.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||||
(logo.title && logo.title.toLowerCase().includes(searchQuery.toLowerCase())) ||
|
(logo.title && logo.title.toLowerCase().includes(searchQuery.toLowerCase())) ||
|
||||||
(logo.brand &&
|
(logo.brand && logo.brand.toLowerCase().includes(searchQuery.toLowerCase())) ||
|
||||||
logo.brand.toLowerCase().includes(searchQuery.toLowerCase()));
|
(logo.meta && Object.values(logo.meta).some(
|
||||||
|
v => typeof v === 'string' && v.toLowerCase().includes(searchQuery.toLowerCase())
|
||||||
|
));
|
||||||
const matchesTags =
|
const matchesTags =
|
||||||
!selectedTags.length ||
|
!selectedTags.length ||
|
||||||
(logo.tags &&
|
(logo.tags &&
|
||||||
@@ -667,7 +672,10 @@
|
|||||||
const matchesSearch =
|
const matchesSearch =
|
||||||
logo.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
logo.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||||||
(logo.title && logo.title.toLowerCase().includes(searchQuery.toLowerCase())) ||
|
(logo.title && logo.title.toLowerCase().includes(searchQuery.toLowerCase())) ||
|
||||||
(logo.brand && logo.brand.toLowerCase().includes(searchQuery.toLowerCase()));
|
(logo.brand && logo.brand.toLowerCase().includes(searchQuery.toLowerCase())) ||
|
||||||
|
(logo.meta && Object.values(logo.meta).some(
|
||||||
|
v => typeof v === 'string' && v.toLowerCase().includes(searchQuery.toLowerCase())
|
||||||
|
));
|
||||||
const matchesTags =
|
const matchesTags =
|
||||||
!selectedTags.length ||
|
!selectedTags.length ||
|
||||||
(logo.tags &&
|
(logo.tags &&
|
||||||
|
|||||||
Reference in New Issue
Block a user