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
501f6962
Commit
501f6962
authored
Dec 18, 2024
by
tom
Committed by
tom goriunov
Dec 23, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix sorting of verified contracts
parent
bd9bdbb5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
verifiedContracts.ts
types/api/verifiedContracts.ts
+1
-1
VerifiedContractsTable.tsx
ui/verifiedContracts/VerifiedContractsTable.tsx
+8
-2
utils.ts
ui/verifiedContracts/utils.ts
+3
-3
No files found.
types/api/verifiedContracts.ts
View file @
501f6962
export
interface
VerifiedContractsSorting
{
export
interface
VerifiedContractsSorting
{
sort
:
'
balance
'
|
'
t
x
s_count
'
;
sort
:
'
balance
'
|
'
t
ransaction
s_count
'
;
order
:
'
asc
'
|
'
desc
'
;
order
:
'
asc
'
|
'
desc
'
;
}
}
...
...
ui/verifiedContracts/VerifiedContractsTable.tsx
View file @
501f6962
...
@@ -40,8 +40,14 @@ const VerifiedContractsTable = ({ data, sort, setSorting, isLoading }: Props) =>
...
@@ -40,8 +40,14 @@ const VerifiedContractsTable = ({ data, sort, setSorting, isLoading }: Props) =>
</
Link
>
</
Link
>
</
Th
>
</
Th
>
<
Th
width=
"130px"
isNumeric
>
<
Th
width=
"130px"
isNumeric
>
<
Link
display=
"flex"
alignItems=
"center"
justifyContent=
"flex-end"
onClick=
{
isLoading
?
undefined
:
onSortToggle
(
'
txs_count
'
)
}
columnGap=
{
1
}
>
<
Link
{
sort
?.
includes
(
'
txs_count
'
)
&&
<
IconSvg
name=
"arrows/east"
boxSize=
{
4
}
transform=
{
sortIconTransform
}
/>
}
display=
"flex"
alignItems=
"center"
justifyContent=
"flex-end"
onClick=
{
isLoading
?
undefined
:
onSortToggle
(
'
transactions_count
'
)
}
columnGap=
{
1
}
>
{
sort
?.
includes
(
'
transactions_count
'
)
&&
<
IconSvg
name=
"arrows/east"
boxSize=
{
4
}
transform=
{
sortIconTransform
}
/>
}
Txs
Txs
</
Link
>
</
Link
>
</
Th
>
</
Th
>
...
...
ui/verifiedContracts/utils.ts
View file @
501f6962
...
@@ -5,11 +5,11 @@ export const SORT_OPTIONS: Array<SelectOption<VerifiedContractsSortingValue>> =
...
@@ -5,11 +5,11 @@ export const SORT_OPTIONS: Array<SelectOption<VerifiedContractsSortingValue>> =
{
label
:
'
Default
'
,
value
:
undefined
},
{
label
:
'
Default
'
,
value
:
undefined
},
{
label
:
'
Balance descending
'
,
value
:
'
balance-desc
'
},
{
label
:
'
Balance descending
'
,
value
:
'
balance-desc
'
},
{
label
:
'
Balance ascending
'
,
value
:
'
balance-asc
'
},
{
label
:
'
Balance ascending
'
,
value
:
'
balance-asc
'
},
{
label
:
'
Txs count descending
'
,
value
:
'
t
x
s_count-desc
'
},
{
label
:
'
Txs count descending
'
,
value
:
'
t
ransaction
s_count-desc
'
},
{
label
:
'
Txs count ascending
'
,
value
:
'
t
x
s_count-asc
'
},
{
label
:
'
Txs count ascending
'
,
value
:
'
t
ransaction
s_count-asc
'
},
];
];
export
const
SORT_SEQUENCE
:
Record
<
VerifiedContractsSortingField
,
Array
<
VerifiedContractsSortingValue
|
undefined
>>
=
{
export
const
SORT_SEQUENCE
:
Record
<
VerifiedContractsSortingField
,
Array
<
VerifiedContractsSortingValue
|
undefined
>>
=
{
balance
:
[
'
balance-desc
'
,
'
balance-asc
'
,
undefined
],
balance
:
[
'
balance-desc
'
,
'
balance-asc
'
,
undefined
],
t
xs_count
:
[
'
txs_count-desc
'
,
'
tx
s_count-asc
'
,
undefined
],
t
ransactions_count
:
[
'
transactions_count-desc
'
,
'
transaction
s_count-asc
'
,
undefined
],
};
};
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