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
772ad9ba
Commit
772ad9ba
authored
Feb 17, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
long skeleton, first attempt
parent
428ec75e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
9 deletions
+20
-9
useQueryWithPages.ts
lib/hooks/useQueryWithPages.ts
+4
-4
zIndices.ts
theme/foundations/zIndices.ts
+1
-0
AddressTxs.tsx
ui/address/AddressTxs.tsx
+1
-0
AddressCoinBalanceHistory.tsx
ui/address/coinBalance/AddressCoinBalanceHistory.tsx
+4
-0
AddressNameInfo.tsx
ui/address/details/AddressNameInfo.tsx
+1
-1
ActionBar.tsx
ui/shared/ActionBar.tsx
+4
-1
TheadSticky.tsx
ui/shared/TheadSticky.tsx
+1
-1
SkeletonTable.tsx
ui/shared/skeletons/SkeletonTable.tsx
+1
-1
TxsContent.tsx
ui/txs/TxsContent.tsx
+3
-1
No files found.
lib/hooks/useQueryWithPages.ts
View file @
772ad9ba
...
...
@@ -5,7 +5,7 @@ import omit from 'lodash/omit';
import
pick
from
'
lodash/pick
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
import
{
animateScroll
}
from
'
react-scroll
'
;
//
import { animateScroll } from 'react-scroll';
import
type
{
PaginatedResources
,
PaginatedResponse
,
PaginationFilters
}
from
'
lib/api/resources
'
;
import
{
RESOURCES
}
from
'
lib/api/resources
'
;
...
...
@@ -25,7 +25,7 @@ export default function useQueryWithPages<Resource extends PaginatedResources>({
filters
,
options
,
pathParams
,
scrollRef
,
//
scrollRef,
}:
Params
<
Resource
>
)
{
const
resource
=
RESOURCES
[
resourceName
];
const
queryClient
=
useQueryClient
();
...
...
@@ -47,8 +47,8 @@ export default function useQueryWithPages<Resource extends PaginatedResources>({
const
queryParams
=
{
...
pageParams
[
page
],
...
filters
};
const
scrollToTop
=
useCallback
(()
=>
{
scrollRef
?.
current
?
scrollRef
.
current
.
scrollIntoView
(
true
)
:
animateScroll
.
scrollToTop
({
duration
:
0
});
},
[
scrollRef
]);
//
scrollRef?.current ? scrollRef.current.scrollIntoView(true) : animateScroll.scrollToTop({ duration: 0 });
},
[
]);
const
queryResult
=
useApiQuery
(
resourceName
,
{
pathParams
,
...
...
theme/foundations/zIndices.ts
View file @
772ad9ba
...
...
@@ -3,6 +3,7 @@ const zIndices = {
auto
:
'
auto
'
,
base
:
0
,
docked
:
10
,
overDocked
:
11
,
tooltip
:
900
,
dropdown
:
1000
,
sticky
:
1100
,
...
...
ui/address/AddressTxs.tsx
View file @
772ad9ba
...
...
@@ -152,6 +152,7 @@ const AddressTxs = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLDivElement>}
showSocketInfo={ addressTxsQuery.pagination.page === 1 }
socketInfoAlert={ socketAlert }
socketInfoNum={ newItemsCount }
top={ 80 }
/>
</>
);
...
...
ui/address/coinBalance/AddressCoinBalanceHistory.tsx
View file @
772ad9ba
...
...
@@ -43,6 +43,10 @@ const AddressCoinBalanceHistory = ({ query }: Props) => {
return
<
DataFetchAlert
/>;
}
if
(
query
.
data
.
items
.
length
===
0
&&
!
query
.
isPaginationVisible
)
{
return
<
span
>
There is no coin balance history for this address
</
span
>;
}
return
(
<>
<
Hide
below=
"lg"
ssr=
{
false
}
>
...
...
ui/address/details/AddressNameInfo.tsx
View file @
772ad9ba
...
...
@@ -20,7 +20,7 @@ const AddressNameInfo = ({ data }: Props) => {
hint=
"Token name and symbol"
>
<
LinkInternal
href=
{
route
({
pathname
:
'
/token/[hash]
'
,
query
:
{
hash
:
data
.
token
.
address
}
})
}
>
{
data
.
token
.
name
}{
symbol
}
{
data
.
token
.
name
||
'
Unnamed token
'
}{
symbol
}
</
LinkInternal
>
</
DetailsInfoItem
>
);
...
...
ui/shared/ActionBar.tsx
View file @
772ad9ba
...
...
@@ -36,7 +36,10 @@ const ActionBar = ({ children, className }: Props) => {
transitionProperty=
"top,box-shadow,background-color,color"
transitionDuration=
"normal"
zIndex=
{
{
base
:
'
sticky2
'
,
lg
:
'
docked
'
}
}
boxShadow=
{
{
base
:
isSticky
?
'
md
'
:
'
none
'
,
lg
:
'
none
'
}
}
boxShadow=
{
{
base
:
isSticky
?
'
md
'
:
'
none
'
,
lg
:
isSticky
?
'
0 4px 6px -6px rgb(0 0 0 / 10%), 0 2px 4px -4px rgb(0 0 0 / 6%)
'
:
'
none
'
,
}
}
ref=
{
ref
}
>
{
children
}
...
...
ui/shared/TheadSticky.tsx
View file @
772ad9ba
...
...
@@ -36,7 +36,7 @@ const TheadSticky = ({ top, children, ...restProps }: Props) => {
top
:
`
${
top
}
px`
||
0
,
backgroundColor
:
useColorModeValue
(
'
white
'
,
'
black
'
),
boxShadow
:
isSticky
?
'
md
'
:
'
none
'
,
zIndex
:
1
,
zIndex
:
'
overDocked
'
,
};
return
(
...
...
ui/shared/skeletons/SkeletonTable.tsx
View file @
772ad9ba
...
...
@@ -10,7 +10,7 @@ const SkeletonTable = ({ columns, className }: Props) => {
return
(
<
Box
className=
{
className
}
>
<
Skeleton
height=
{
10
}
width=
"100%"
borderBottomLeftRadius=
"none"
borderBottomRightRadius=
"none"
/>
{
Array
.
from
(
Array
(
3
)).
map
((
item
,
index
)
=>
(
{
Array
.
from
(
Array
(
50
)).
map
((
item
,
index
)
=>
(
<
HStack
key=
{
index
}
spacing=
{
6
}
marginTop=
{
8
}
>
{
columns
.
map
((
width
,
index
)
=>
(
<
Skeleton
...
...
ui/txs/TxsContent.tsx
View file @
772ad9ba
...
...
@@ -31,6 +31,7 @@ type Props = {
currentAddress
?:
string
;
filter
?:
React
.
ReactNode
;
enableTimeIncrement
?:
boolean
;
top
?:
number
;
}
const
TxsContent
=
({
...
...
@@ -42,6 +43,7 @@ const TxsContent = ({
socketInfoNum
,
currentAddress
,
enableTimeIncrement
,
top
,
}:
Props
)
=>
{
const
{
data
,
isLoading
,
isError
,
setSortByField
,
setSortByValue
,
sorting
}
=
useTxsSort
(
query
);
const
isMobile
=
useIsMobile
();
...
...
@@ -105,7 +107,7 @@ const TxsContent = ({
showSocketInfo=
{
showSocketInfo
}
socketInfoAlert=
{
socketInfoAlert
}
socketInfoNum=
{
socketInfoNum
}
top=
{
query
.
isPaginationVisible
?
80
:
0
}
top=
{
top
||
query
.
isPaginationVisible
?
80
:
0
}
currentAddress=
{
currentAddress
}
enableTimeIncrement=
{
enableTimeIncrement
}
/>
...
...
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