Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
132c340f
Commit
132c340f
authored
Mar 20, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update empty search result
parent
5899f908
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
33 deletions
+45
-33
EmptySearchResult.tsx
ui/marketplace/EmptySearchResult.tsx
+41
-0
MarketplaceList.tsx
ui/marketplace/MarketplaceList.tsx
+2
-17
MarketplaceListWithScores.tsx
ui/marketplace/MarketplaceListWithScores.tsx
+2
-16
No files found.
ui/marketplace/EmptySearchResult.tsx
0 → 100644
View file @
132c340f
import
React
from
'
react
'
;
import
{
MarketplaceCategory
}
from
'
types/client/marketplace
'
;
import
config
from
'
configs/app
'
;
import
{
apos
}
from
'
lib/html-entities
'
;
import
EmptySearchResultDefault
from
'
ui/shared/EmptySearchResult
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
LinkExternal
from
'
ui/shared/LinkExternal
'
;
const
feature
=
config
.
features
.
marketplace
;
type
Props
=
{
favoriteApps
:
Array
<
string
>
;
selectedCategoryId
?:
string
;
}
const
EmptySearchResult
=
({
favoriteApps
,
selectedCategoryId
}:
Props
)
=>
(
<
EmptySearchResultDefault
text=
{
(
selectedCategoryId
===
MarketplaceCategory
.
FAVORITES
&&
!
favoriteApps
.
length
)
?
(
<>
You don
{
apos
}
t have any favorite apps.
Click on the
<
IconSvg
name=
"star_outline"
w=
{
4
}
h=
{
4
}
mb=
{
-
0.5
}
/>
icon on the app
{
apos
}
s card to add it to Favorites.
</>
)
:
(
<>
No matching apps found.
{
'
suggestIdeasFormUrl
'
in
feature
&&
(
<>
{
'
'
}
Have a groundbreaking idea or app suggestion?
{
'
'
}
<
LinkExternal
href=
{
feature
.
suggestIdeasFormUrl
}
>
Share it with us
</
LinkExternal
>
</>
)
}
</>
)
}
/>
);
export
default
React
.
memo
(
EmptySearchResult
);
ui/marketplace/MarketplaceList.tsx
View file @
132c340f
...
...
@@ -3,12 +3,8 @@ import React from 'react';
import
type
{
MouseEvent
}
from
'
react
'
;
import
type
{
MarketplaceAppPreview
}
from
'
types/client/marketplace
'
;
import
{
MarketplaceCategory
}
from
'
types/client/marketplace
'
;
import
{
apos
}
from
'
lib/html-entities
'
;
import
EmptySearchResult
from
'
ui/shared/EmptySearchResult
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
EmptySearchResult
from
'
./EmptySearchResult
'
;
import
MarketplaceAppCard
from
'
./MarketplaceAppCard
'
;
type
Props
=
{
...
...
@@ -52,18 +48,7 @@ const MarketplaceList = ({ apps, showAppInfo, favoriteApps, onFavoriteClick, isL
))
}
</
Grid
>
)
:
(
<
EmptySearchResult
text=
{
(
selectedCategoryId
===
MarketplaceCategory
.
FAVORITES
&&
!
favoriteApps
.
length
)
?
(
<>
You don
{
apos
}
t have any favorite apps.
Click on the
<
IconSvg
name=
"star_outline"
w=
{
4
}
h=
{
4
}
mb=
{
-
0.5
}
/>
icon on the app
{
apos
}
s card to add it to Favorites.
</>
)
:
(
`Couldn${ apos }t find an app that matches your filter query.`
)
}
/>
<
EmptySearchResult
selectedCategoryId=
{
selectedCategoryId
}
favoriteApps=
{
favoriteApps
}
/>
);
};
...
...
ui/marketplace/MarketplaceListWithScores.tsx
View file @
132c340f
...
...
@@ -3,13 +3,10 @@ import React from 'react';
import
type
{
MouseEvent
}
from
'
react
'
;
import
type
{
MarketplaceAppWithSecurityReport
,
ContractListTypes
}
from
'
types/client/marketplace
'
;
import
{
MarketplaceCategory
}
from
'
types/client/marketplace
'
;
import
{
apos
}
from
'
lib/html-entities
'
;
import
DataListDisplay
from
'
ui/shared/DataListDisplay
'
;
import
EmptySearchResult
from
'
ui/shared/EmptySearchResult
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
EmptySearchResult
from
'
./EmptySearchResult
'
;
import
ListItem
from
'
./MarketplaceListWithScores/ListItem
'
;
import
Table
from
'
./MarketplaceListWithScores/Table
'
;
...
...
@@ -82,18 +79,7 @@ const MarketplaceListWithScores = ({
content=
{
content
}
/>
)
:
(
<
EmptySearchResult
text=
{
(
selectedCategoryId
===
MarketplaceCategory
.
FAVORITES
&&
!
favoriteApps
.
length
)
?
(
<>
You don
{
apos
}
t have any favorite apps.
Click on the
<
IconSvg
name=
"star_outline"
w=
{
4
}
h=
{
4
}
mb=
{
-
0.5
}
/>
icon on the app
{
apos
}
s card to add it to Favorites.
</>
)
:
(
`Couldn${ apos }t find an app that matches your filter query.`
)
}
/>
<
EmptySearchResult
selectedCategoryId=
{
selectedCategoryId
}
favoriteApps=
{
favoriteApps
}
/>
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment