mirror of
https://github.com/shadoll/sLogos.git
synced 2026-08-28 11:33:29 +00:00
Enhance logo search and display functionality
- Updated logo filtering to include title in search criteria across multiple components. - Modified CardFull, CardMiddle, CardSmall, and CardTiny components to display title or name as appropriate. - Added support for displaying logo variants in CardFull component. - Improved logo retrieval logic in Preview page to account for title matching.
This commit is contained in:
@@ -22,8 +22,10 @@
|
||||
}
|
||||
const logoName = params.logoName.replace(/-/g, ' ');
|
||||
logo = logos.find(l =>
|
||||
l.name.toLowerCase() === params.logoName.toLowerCase() ||
|
||||
l.name.toLowerCase().replace(/\s+/g, '-') === params.logoName.toLowerCase() ||
|
||||
l.name.toLowerCase() === logoName.toLowerCase()
|
||||
(l.title && l.title.toLowerCase() === logoName.toLowerCase()) ||
|
||||
(l.title && l.title.toLowerCase().replace(/\s+/g, '-') === params.logoName.toLowerCase())
|
||||
);
|
||||
if (!logo) {
|
||||
console.error("Logo not found:", params.logoName);
|
||||
|
||||
Reference in New Issue
Block a user