@@ -4,6 +4,7 @@ import { Checkbox, Dropdown, IDropdownOption, SelectableOptionMenuItemType } fro
4
4
import * as React from 'react' ;
5
5
import { Link } from 'react-router-dom' ;
6
6
import './SearchResults.css' ;
7
+ import DefaultPackageIcon from "./default-package-icon-256x256.png" ;
7
8
8
9
interface ISearchResultsProps {
9
10
input : string ;
@@ -32,7 +33,6 @@ interface ISearchResponse {
32
33
33
34
class SearchResults extends React . Component < ISearchResultsProps , ISearchResultsState > {
34
35
35
- private readonly defaultIconUrl : string = 'https://www.nuget.org/Content/gallery/img/default-package-icon-256x256.png' ;
36
36
private resultsController ?: AbortController ;
37
37
38
38
constructor ( props : ISearchResultsProps ) {
@@ -160,7 +160,7 @@ class SearchResults extends React.Component<ISearchResultsProps, ISearchResultsS
160
160
< div key = { value . id } className = "row search-result" >
161
161
< div className = "col-sm-1 hidden-xs hidden-sm" >
162
162
< img
163
- src = { value . iconUrl || this . defaultIconUrl }
163
+ src = { value . iconUrl || DefaultPackageIcon }
164
164
className = "package-icon img-responsive"
165
165
onError = { this . loadDefaultIcon }
166
166
alt = "The package icon" />
@@ -272,7 +272,7 @@ class SearchResults extends React.Component<ISearchResultsProps, ISearchResultsS
272
272
}
273
273
274
274
private loadDefaultIcon = ( e : React . SyntheticEvent < HTMLImageElement > ) => {
275
- e . currentTarget . src = this . defaultIconUrl ;
275
+ e . currentTarget . src = DefaultPackageIcon ;
276
276
}
277
277
278
278
private onChangePackageType = ( e : React . FormEvent < HTMLDivElement > , option ?: IDropdownOption ) : void => {
0 commit comments