Commit 5cb5e3be authored by tom's avatar tom

fix navigation between pages for shibarium deposits and withdrawals views

parent 4ea00c0f
...@@ -14,7 +14,7 @@ import DepositsTableItem from './DepositsTableItem'; ...@@ -14,7 +14,7 @@ import DepositsTableItem from './DepositsTableItem';
const DepositsTable = ({ items, top, isLoading }: Props) => { const DepositsTable = ({ items, top, isLoading }: Props) => {
return ( return (
<TableRoot style={{ tableLayout: 'auto' }} minW="950px"> <TableRoot tableLayout="auto" minW="950px">
<TableHeaderSticky top={ top }> <TableHeaderSticky top={ top }>
<TableRow> <TableRow>
<TableColumnHeader>L1 block No</TableColumnHeader> <TableColumnHeader>L1 block No</TableColumnHeader>
...@@ -26,7 +26,7 @@ const DepositsTable = ({ items, top, isLoading }: Props) => { ...@@ -26,7 +26,7 @@ const DepositsTable = ({ items, top, isLoading }: Props) => {
</TableHeaderSticky> </TableHeaderSticky>
<TableBody> <TableBody>
{ items.map((item, index) => ( { items.map((item, index) => (
<DepositsTableItem key={ item.l2_transaction_hash + (isLoading ? index : '') } item={ item } isLoading={ isLoading }/> <DepositsTableItem key={ `${ item.l2_transaction_hash }-${ index }` } item={ item } isLoading={ isLoading }/>
)) } )) }
</TableBody> </TableBody>
</TableRoot> </TableRoot>
......
...@@ -42,7 +42,7 @@ const L2Deposits = () => { ...@@ -42,7 +42,7 @@ const L2Deposits = () => {
<Box hideFrom="lg"> <Box hideFrom="lg">
{ data.items.map(((item, index) => ( { data.items.map(((item, index) => (
<DepositsListItem <DepositsListItem
key={ item.l2_transaction_hash + (isPlaceholderData ? index : '') } key={ `${ item.l2_transaction_hash }-${ index }` }
isLoading={ isPlaceholderData } isLoading={ isPlaceholderData }
item={ item } item={ item }
/> />
......
...@@ -14,7 +14,7 @@ import StickyPaginationWithText from 'ui/shared/StickyPaginationWithText'; ...@@ -14,7 +14,7 @@ import StickyPaginationWithText from 'ui/shared/StickyPaginationWithText';
import WithdrawalsListItem from 'ui/withdrawals/shibarium/WithdrawalsListItem'; import WithdrawalsListItem from 'ui/withdrawals/shibarium/WithdrawalsListItem';
import WithdrawalsTable from 'ui/withdrawals/shibarium/WithdrawalsTable'; import WithdrawalsTable from 'ui/withdrawals/shibarium/WithdrawalsTable';
const L2Withdrawals = () => { const ShibariumWithdrawals = () => {
const { data, isError, isPlaceholderData, pagination } = useQueryWithPages({ const { data, isError, isPlaceholderData, pagination } = useQueryWithPages({
resourceName: 'shibarium_withdrawals', resourceName: 'shibarium_withdrawals',
options: { options: {
...@@ -42,7 +42,7 @@ const L2Withdrawals = () => { ...@@ -42,7 +42,7 @@ const L2Withdrawals = () => {
<Box hideFrom="lg"> <Box hideFrom="lg">
{ data.items.map(((item, index) => ( { data.items.map(((item, index) => (
<WithdrawalsListItem <WithdrawalsListItem
key={ item.l2_transaction_hash + (isPlaceholderData ? index : '') } key={ `${ item.l2_transaction_hash }-${ index }` }
item={ item } item={ item }
isLoading={ isPlaceholderData } isLoading={ isPlaceholderData }
/> />
...@@ -83,4 +83,4 @@ const L2Withdrawals = () => { ...@@ -83,4 +83,4 @@ const L2Withdrawals = () => {
); );
}; };
export default L2Withdrawals; export default ShibariumWithdrawals;
...@@ -14,7 +14,7 @@ import WithdrawalsTableItem from './WithdrawalsTableItem'; ...@@ -14,7 +14,7 @@ import WithdrawalsTableItem from './WithdrawalsTableItem';
const WithdrawalsTable = ({ items, top, isLoading }: Props) => { const WithdrawalsTable = ({ items, top, isLoading }: Props) => {
return ( return (
<TableRoot style={{ tableLayout: 'auto' }} minW="950px"> <TableRoot tableLayout="auto" minW="950px">
<TableHeaderSticky top={ top }> <TableHeaderSticky top={ top }>
<TableRow> <TableRow>
<TableColumnHeader>L2 block No</TableColumnHeader> <TableColumnHeader>L2 block No</TableColumnHeader>
...@@ -26,7 +26,7 @@ const WithdrawalsTable = ({ items, top, isLoading }: Props) => { ...@@ -26,7 +26,7 @@ const WithdrawalsTable = ({ items, top, isLoading }: Props) => {
</TableHeaderSticky> </TableHeaderSticky>
<TableBody> <TableBody>
{ items.map((item, index) => ( { items.map((item, index) => (
<WithdrawalsTableItem key={ item.l2_transaction_hash + (isLoading ? index : '') } item={ item } isLoading={ isLoading }/> <WithdrawalsTableItem key={ `${ item.l2_transaction_hash }-${ index }` } item={ item } isLoading={ isLoading }/>
)) } )) }
</TableBody> </TableBody>
</TableRoot> </TableRoot>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment