@ludo.ninja/components 2.1.88 → 2.1.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,6 +17,7 @@ const ScreenWidth_1 = require("../../../styles/ScreenWidth");
|
|
|
17
17
|
const _3d_1 = require("../../../utils/3d");
|
|
18
18
|
const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
|
|
19
19
|
const ItemType_1 = require("../../../dto/common/ItemType");
|
|
20
|
+
const Badge_1 = __importDefault(require("../../../system/Badge"));
|
|
20
21
|
// Styles
|
|
21
22
|
const StyledSearchSuggestions = styled_components_1.default.div `
|
|
22
23
|
position: relative;
|
|
@@ -138,7 +139,7 @@ const SearchSuggestions = ({ searchTerm, assets, profiles, collections, isLoadin
|
|
|
138
139
|
caption: 'Profiles',
|
|
139
140
|
children: profiles.map((profile) => ((0, jsx_runtime_1.jsx)(searchSuggestionsItem_1.default, { borderRadius: true, name: profile.getName() || '', link: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["profile"]}/${profile.getUserId()}/nfts`, imgUrl: profile.getUserPic({
|
|
140
141
|
mediaDomain: getMediaENVDomain(),
|
|
141
|
-
}), additionalHTML: Boolean(profile.getFollowings()) && ((0, jsx_runtime_1.jsxs)("span", { className: 'additional', children: [profile.getFollowings(), " followers"] })), searchTerm: searchTerm }, profile.getUserId()))),
|
|
142
|
+
}), additionalHTML: Boolean(profile.getFollowings()) && ((0, jsx_runtime_1.jsxs)("span", { className: 'additional', children: [profile.getFollowings(), " followers"] })), afterText: (0, jsx_runtime_1.jsx)(Badge_1.default, { color: profile.getReferralTypeColor(), title: profile.getReferralTypeName() }), searchTerm: searchTerm }, profile.getUserId()))),
|
|
142
143
|
},
|
|
143
144
|
]
|
|
144
145
|
: []),
|
|
@@ -44,6 +44,7 @@ const StyledSearchSuggestionsItem = styled_components_1.default.div `
|
|
|
44
44
|
|
|
45
45
|
.text {
|
|
46
46
|
display: flex;
|
|
47
|
+
gap: 8px;
|
|
47
48
|
|
|
48
49
|
overflow: hidden;
|
|
49
50
|
|
|
@@ -107,10 +108,10 @@ const StyledSearchSuggestionsItem = styled_components_1.default.div `
|
|
|
107
108
|
}
|
|
108
109
|
`;
|
|
109
110
|
// Components
|
|
110
|
-
const SearchSuggestionsItem = ({ name, link, imgUrl, borderRadius, additionalHTML, searchTerm, }) => ((0, jsx_runtime_1.jsx)(StyledSearchSuggestionsItem, { borderRadius: borderRadius, children: (0, jsx_runtime_1.jsxs)("a", { href: link, className: 'link', children: [(0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { borderRadiusSkeleton: borderRadius && 16, children: (0, jsx_runtime_1.jsx)("img", { src: imgUrl, alt: 'pirate', width: 32, height: 32 }) }), (0, jsx_runtime_1.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
const SearchSuggestionsItem = ({ name, link, imgUrl, borderRadius, additionalHTML, searchTerm, afterText }) => ((0, jsx_runtime_1.jsx)(StyledSearchSuggestionsItem, { borderRadius: borderRadius, children: (0, jsx_runtime_1.jsxs)("a", { href: link, className: 'link', children: [(0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { borderRadiusSkeleton: borderRadius && 16, children: (0, jsx_runtime_1.jsx)("img", { src: imgUrl, alt: 'pirate', width: 32, height: 32 }) }), (0, jsx_runtime_1.jsxs)("div", { className: 'text', children: [(0, jsx_runtime_1.jsx)("p", { className: 'regular', children: (0, utils_1.searchQueryLetters)({
|
|
112
|
+
text: name,
|
|
113
|
+
searchQuery: searchTerm,
|
|
114
|
+
className: 'strong',
|
|
115
|
+
}) }), afterText] }), additionalHTML] }) }));
|
|
115
116
|
// Export
|
|
116
117
|
exports.default = SearchSuggestionsItem;
|