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
8c974a46
Commit
8c974a46
authored
Mar 14, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move components
parent
50db854a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
15 deletions
+21
-15
AppSecurityReport.tsx
ui/marketplace/AppSecurityReport.tsx
+0
-0
ContractListButton.tsx
ui/marketplace/ContractListButton.tsx
+6
-6
ListItem.tsx
ui/marketplace/MarketplaceListWithScores/ListItem.tsx
+8
-4
TableItem.tsx
ui/marketplace/MarketplaceListWithScores/TableItem.tsx
+7
-5
No files found.
ui/marketplace/
MarketplaceListWithScores/
AppSecurityReport.tsx
→
ui/marketplace/AppSecurityReport.tsx
View file @
8c974a46
File moved
ui/marketplace/
MarketplaceListWithScores/Link
Button.tsx
→
ui/marketplace/
ContractList
Button.tsx
View file @
8c974a46
...
...
@@ -6,18 +6,18 @@ import config from 'configs/app';
import
type
{
IconName
}
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
export
enum
Link
ButtonVariants
{
export
enum
ContractList
ButtonVariants
{
ALL_CONTRACTS
=
'
all contracts
'
,
VERIFIED_CONTRACTS
=
'
verified contracts
'
,
}
const
values
=
{
[
Link
ButtonVariants
.
ALL_CONTRACTS
]:
{
[
ContractList
ButtonVariants
.
ALL_CONTRACTS
]:
{
icon
:
'
contracts
'
as
IconName
,
iconColor
:
'
gray.500
'
,
tooltip
:
`Total number of contracts deployed by the protocol on
${
config
.
chain
.
name
}
`
,
},
[
Link
ButtonVariants
.
VERIFIED_CONTRACTS
]:
{
[
ContractList
ButtonVariants
.
VERIFIED_CONTRACTS
]:
{
icon
:
'
contracts_verified
'
as
IconName
,
iconColor
:
'
green.500
'
,
tooltip
:
`Number of verified contracts on
${
config
.
chain
.
name
}
`
,
...
...
@@ -27,10 +27,10 @@ const values = {
interface
Props
{
children
:
string
;
onClick
:
(
event
:
MouseEvent
)
=>
void
;
variant
:
Link
ButtonVariants
;
variant
:
ContractList
ButtonVariants
;
}
const
Link
Button
=
({
children
,
onClick
,
variant
}:
Props
)
=>
{
const
ContractList
Button
=
({
children
,
onClick
,
variant
}:
Props
)
=>
{
const
{
icon
,
iconColor
,
tooltip
}
=
values
[
variant
];
return
(
<
Tooltip
...
...
@@ -54,4 +54,4 @@ const LinkButton = ({ children, onClick, variant }: Props) => {
);
};
export
default
Link
Button
;
export
default
ContractList
Button
;
ui/marketplace/MarketplaceListWithScores/ListItem.tsx
View file @
8c974a46
...
...
@@ -9,9 +9,9 @@ import * as mixpanel from 'lib/mixpanel/index';
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
ListItemMobile
from
'
ui/shared/ListItemMobile/ListItemMobile
'
;
import
AppSecurityReport
from
'
../AppSecurityReport
'
;
import
ContractListButton
,
{
ContractListButtonVariants
}
from
'
../ContractListButton
'
;
import
AppLink
from
'
./AppLink
'
;
import
AppSecurityReport
from
'
./AppSecurityReport
'
;
import
LinkButton
,
{
LinkButtonVariants
}
from
'
./LinkButton
'
;
import
MoreInfoButton
from
'
./MoreInfoButton
'
;
type
Props
=
{
...
...
@@ -99,8 +99,12 @@ const ListItem = ({ app, onInfoClick, isFavorite, onFavoriteClick, isLoading, on
<
Flex
alignItems=
"center"
>
<
Flex
flex=
{
1
}
gap=
{
3
}
alignItems=
"center"
>
<
AppSecurityReport
id=
{
id
}
securityReport=
{
securityReport
}
showContractList=
{
showContractList
}
/>
<
LinkButton
onClick=
{
showAllContracts
}
variant=
{
LinkButtonVariants
.
ALL_CONTRACTS
}
>
{
totalContractsNumber
}
</
LinkButton
>
<
LinkButton
onClick=
{
showVerifiedContracts
}
variant=
{
LinkButtonVariants
.
VERIFIED_CONTRACTS
}
>
{
verifiedNumber
}
</
LinkButton
>
<
ContractListButton
onClick=
{
showAllContracts
}
variant=
{
ContractListButtonVariants
.
ALL_CONTRACTS
}
>
{
totalContractsNumber
}
</
ContractListButton
>
<
ContractListButton
onClick=
{
showVerifiedContracts
}
variant=
{
ContractListButtonVariants
.
VERIFIED_CONTRACTS
}
>
{
verifiedNumber
}
</
ContractListButton
>
</
Flex
>
{
!
isLoading
&&
(
<
MoreInfoButton
onClick=
{
handleInfoClick
}
/>
...
...
ui/marketplace/MarketplaceListWithScores/TableItem.tsx
View file @
8c974a46
...
...
@@ -8,9 +8,9 @@ import { ContractListTypes } from 'types/client/marketplace';
import
*
as
mixpanel
from
'
lib/mixpanel/index
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
AppSecurityReport
from
'
../AppSecurityReport
'
;
import
ContractListButton
,
{
ContractListButtonVariants
}
from
'
../ContractListButton
'
;
import
AppLink
from
'
./AppLink
'
;
import
AppSecurityReport
from
'
./AppSecurityReport
'
;
import
LinkButton
,
{
LinkButtonVariants
}
from
'
./LinkButton
'
;
import
MoreInfoButton
from
'
./MoreInfoButton
'
;
type
Props
=
{
...
...
@@ -86,12 +86,14 @@ const TableItem = ({
<
AppSecurityReport
id=
{
id
}
securityReport=
{
securityReport
}
showContractList=
{
showContractList
}
isLarge
/>
</
Td
>
<
Td
verticalAlign=
"middle"
>
<
LinkButton
onClick=
{
showAllContracts
}
variant=
{
Link
ButtonVariants
.
ALL_CONTRACTS
}
>
<
ContractListButton
onClick=
{
showAllContracts
}
variant=
{
ContractList
ButtonVariants
.
ALL_CONTRACTS
}
>
{
totalContractsNumber
}
</
Link
Button
>
</
ContractList
Button
>
</
Td
>
<
Td
verticalAlign=
"middle"
>
<
LinkButton
onClick=
{
showVerifiedContracts
}
variant=
{
LinkButtonVariants
.
VERIFIED_CONTRACTS
}
>
{
verifiedNumber
}
</
LinkButton
>
<
ContractListButton
onClick=
{
showVerifiedContracts
}
variant=
{
ContractListButtonVariants
.
VERIFIED_CONTRACTS
}
>
{
verifiedNumber
}
</
ContractListButton
>
</
Td
>
<
Td
verticalAlign=
"middle"
isNumeric
>
<
MoreInfoButton
onClick=
{
handleInfoClick
}
/>
...
...
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