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
a2aaae0b
Commit
a2aaae0b
authored
Jan 17, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
d7075bc8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
12 deletions
+20
-12
AddressTokenTransfers.tsx
ui/address/AddressTokenTransfers.tsx
+12
-9
AddressTxs.tsx
ui/address/AddressTxs.tsx
+2
-2
TxsContent.tsx
ui/txs/TxsContent.tsx
+6
-1
No files found.
ui/address/AddressTokenTransfers.tsx
View file @
a2aaae0b
...
@@ -120,11 +120,11 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
...
@@ -120,11 +120,11 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
};
};
const
handleSocketClose
=
React
.
useCallback
(()
=>
{
const
handleSocketClose
=
React
.
useCallback
(()
=>
{
setSocketAlert
(
'
Connection is lost. Please
click her
e to load new token transfers.
'
);
setSocketAlert
(
'
Connection is lost. Please
refresh the pag
e to load new token transfers.
'
);
},
[]);
},
[]);
const
handleSocketError
=
React
.
useCallback
(()
=>
{
const
handleSocketError
=
React
.
useCallback
(()
=>
{
setSocketAlert
(
'
An error has occurred while fetching new token transfers. Please
click here to
refresh the page.
'
);
setSocketAlert
(
'
An error has occurred while fetching new token transfers. Please refresh the page.
'
);
},
[]);
},
[]);
const
channel
=
useSocketChannel
({
const
channel
=
useSocketChannel
({
...
@@ -179,18 +179,21 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
...
@@ -179,18 +179,21 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
showTxInfo
showTxInfo
top=
{
80
}
top=
{
80
}
enableTimeIncrement
enableTimeIncrement
showSocketInfo
showSocketInfo
=
{
pagination
.
page
===
1
}
socketInfoAlert=
{
socketAlert
}
socketInfoAlert=
{
socketAlert
}
socketInfoNum=
{
newItemsCount
}
socketInfoNum=
{
newItemsCount
}
/>
/>
</
Hide
>
</
Hide
>
<
Show
below=
"lg"
>
<
Show
below=
"lg"
>
{
pagination
.
page
===
1
&&
(
<
SocketNewItemsNotice
<
SocketNewItemsNotice
url=
{
window
.
location
.
href
}
url=
{
window
.
location
.
href
}
num=
{
newItemsCount
}
num=
{
newItemsCount
}
alert=
{
socketAlert
}
alert=
{
socketAlert
}
type=
"token_transfer"
type=
"token_transfer"
borderBottomRadius=
{
0
}
/>
/>
)
}
<
TokenTransferList
<
TokenTransferList
data=
{
items
}
data=
{
items
}
baseAddress=
{
currentAddress
}
baseAddress=
{
currentAddress
}
...
...
ui/address/AddressTxs.tsx
View file @
a2aaae0b
...
@@ -101,11 +101,11 @@ const AddressTxs = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLDivElement>}
...
@@ -101,11 +101,11 @@ const AddressTxs = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLDivElement>}
};
};
const
handleSocketClose
=
React
.
useCallback
(()
=>
{
const
handleSocketClose
=
React
.
useCallback
(()
=>
{
setSocketAlert
(
'
Connection is lost. Please
click her
e to load new transactions.
'
);
setSocketAlert
(
'
Connection is lost. Please
refresh the pag
e to load new transactions.
'
);
},
[]);
},
[]);
const
handleSocketError
=
React
.
useCallback
(()
=>
{
const
handleSocketError
=
React
.
useCallback
(()
=>
{
setSocketAlert
(
'
An error has occurred while fetching new transactions. Please
click here to
refresh the page.
'
);
setSocketAlert
(
'
An error has occurred while fetching new transactions. Please refresh the page.
'
);
},
[]);
},
[]);
const
channel
=
useSocketChannel
({
const
channel
=
useSocketChannel
({
...
...
ui/txs/TxsContent.tsx
View file @
a2aaae0b
...
@@ -75,7 +75,12 @@ const TxsContent = ({
...
@@ -75,7 +75,12 @@ const TxsContent = ({
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
Box
>
<
Box
>
{
showSocketInfo
&&
(
{
showSocketInfo
&&
(
<
SocketNewItemsNotice
url=
{
window
.
location
.
href
}
num=
{
socketInfoNum
}
alert=
{
socketInfoAlert
}
>
<
SocketNewItemsNotice
url=
{
window
.
location
.
href
}
num=
{
socketInfoNum
}
alert=
{
socketInfoAlert
}
borderBottomRadius=
{
0
}
>
{
({
content
})
=>
<
Box
>
{
content
}
</
Box
>
}
{
({
content
})
=>
<
Box
>
{
content
}
</
Box
>
}
</
SocketNewItemsNotice
>
</
SocketNewItemsNotice
>
)
}
)
}
...
...
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