Commit ad814895 authored by tom's avatar tom

Merge branch 'main' of github.com:blockscout/frontend into skeletons/rest-pages

parents 20a5efdf d0fff2d1
...@@ -67,15 +67,15 @@ jobs: ...@@ -67,15 +67,15 @@ jobs:
build-args: | build-args: |
GIT_COMMIT_SHA=${{ env.SHORT_SHA }} GIT_COMMIT_SHA=${{ env.SHORT_SHA }}
GIT_TAG=${{ github.ref_type == 'tag' && github.github.ref_name || '' }} GIT_TAG=${{ github.ref_type == 'tag' && github.github.ref_name || '' }}
deploy_and_tests: #deploy_and_tests:
# if: github.event.review.state == 'approved' # if: github.event.review.state == 'approved'
needs: push_to_registry # needs: push_to_registry
uses: blockscout/blockscout-ci-cd/.github/workflows/e2e_new.yaml@master # uses: blockscout/blockscout-ci-cd/.github/workflows/e2e_new.yaml@master
with: # with:
appNamespace: e2e-front-$GITHUB_SHA_SHORT # appNamespace: e2e-front-$GITHUB_SHA_SHORT
frontendImage: ${{ needs.push_to_registry.outputs.tags }} # frontendImage: ${{ needs.push_to_registry.outputs.tags }}
blockscoutIngressHost: e2e-blockscout-$GITHUB_SHA_SHORT # blockscoutIngressHost: e2e-blockscout-$GITHUB_SHA_SHORT
frontendIngressHost: e2e-blockscout-$GITHUB_SHA_SHORT # frontendIngressHost: e2e-blockscout-$GITHUB_SHA_SHORT
gethIngressHost: e2e-geth-$GITHUB_SHA_SHORT # gethIngressHost: e2e-geth-$GITHUB_SHA_SHORT
scVerifierIngressHost: e2e-sc-verifier-$GITHUB_SHA_SHORT # scVerifierIngressHost: e2e-sc-verifier-$GITHUB_SHA_SHORT
secrets: inherit # secrets: inherit
...@@ -96,8 +96,7 @@ export default function useQueryWithPages<Resource extends PaginatedResources>({ ...@@ -96,8 +96,7 @@ export default function useQueryWithPages<Resource extends PaginatedResources>({
nextPageQuery = omit(router.query, [ 'next_page_params', 'page' ]); nextPageQuery = omit(router.query, [ 'next_page_params', 'page' ]);
canGoBackwards.current = true; canGoBackwards.current = true;
} else { } else {
const nextPageParams = pageParams[page - 1]; nextPageQuery.next_page_params = encodeURIComponent(JSON.stringify(pageParams[page - 1]));
nextPageParams && Object.entries(nextPageParams).forEach(([ key, val ]) => nextPageQuery[key] = String(val));
nextPageQuery.page = String(page - 1); nextPageQuery.page = String(page - 1);
} }
......
...@@ -88,7 +88,7 @@ const NavLinkGroupDesktop = ({ item, isCollapsed }: Props) => { ...@@ -88,7 +88,7 @@ const NavLinkGroupDesktop = ({ item, isCollapsed }: Props) => {
{ subItem.map(subSubItem => <NavLink key={ subSubItem.text } item={ subSubItem } isCollapsed={ false }/>) } { subItem.map(subSubItem => <NavLink key={ subSubItem.text } item={ subSubItem } isCollapsed={ false }/>) }
</Box> </Box>
) : ) :
<NavLink key={ item.text } item={ subItem } isCollapsed={ false }/>, <NavLink key={ subItem.text } item={ subItem } isCollapsed={ false }/>,
) } ) }
</VStack> </VStack>
</PopoverBody> </PopoverBody>
......
...@@ -49,8 +49,14 @@ const TokenDetails = ({ tokenQuery }: Props) => { ...@@ -49,8 +49,14 @@ const TokenDetails = ({ tokenQuery }: Props) => {
const tab: TokenTabs = item === 'token_holders_count' ? 'holders' : 'token_transfers'; const tab: TokenTabs = item === 'token_holders_count' ? 'holders' : 'token_transfers';
return <Link onClick={ changeUrlAndScroll(tab) }>{ Number(itemValue).toLocaleString() }</Link>; return (
}, [ tokenCountersQuery.data, changeUrlAndScroll ]); <Skeleton isLoaded={ !tokenCountersQuery.isPlaceholderData }>
<Link onClick={ changeUrlAndScroll(tab) }>
{ Number(itemValue).toLocaleString() }
</Link>
</Skeleton>
);
}, [ tokenCountersQuery.data, tokenCountersQuery.isPlaceholderData, changeUrlAndScroll ]);
if (tokenQuery.isError) { if (tokenQuery.isError) {
throw Error('Token fetch error', { cause: tokenQuery.error as unknown as Error }); throw Error('Token fetch error', { cause: tokenQuery.error as unknown as Error });
......
...@@ -16,7 +16,7 @@ const TokenTransferList = ({ data, tokenId, isLoading }: Props) => { ...@@ -16,7 +16,7 @@ const TokenTransferList = ({ data, tokenId, isLoading }: Props) => {
<Box> <Box>
{ data.map((item, index) => ( { data.map((item, index) => (
<TokenTransferListItem <TokenTransferListItem
key={ index } key={ item.tx_hash + item.block_hash + item.log_index + '_' + index }
{ ...item } { ...item }
tokenId={ tokenId } tokenId={ tokenId }
isLoading={ isLoading } isLoading={ isLoading }
......
...@@ -90,7 +90,7 @@ const TokenTransferListItem = ({ ...@@ -90,7 +90,7 @@ const TokenTransferListItem = ({
Value Value
</Skeleton> </Skeleton>
<Skeleton isLoaded={ !isLoading } color="text_secondary"> <Skeleton isLoaded={ !isLoading } color="text_secondary">
{ value } <span>{ value }</span>
</Skeleton> </Skeleton>
<Skeleton isLoaded={ !isLoading }>{ trimTokenSymbol(token.symbol) }</Skeleton> <Skeleton isLoaded={ !isLoading }>{ trimTokenSymbol(token.symbol) }</Skeleton>
</Flex> </Flex>
......
...@@ -48,7 +48,12 @@ const TokenTransferTable = ({ data, top, showSocketInfo, socketInfoAlert, socket ...@@ -48,7 +48,12 @@ const TokenTransferTable = ({ data, top, showSocketInfo, socketInfoAlert, socket
/> />
) } ) }
{ data.map((item, index) => ( { data.map((item, index) => (
<TokenTransferTableItem key={ index } { ...item } tokenId={ tokenId } isLoading={ isLoading }/> <TokenTransferTableItem
key={ item.tx_hash + item.block_hash + item.log_index + '_' + index }
{ ...item }
tokenId={ tokenId }
isLoading={ isLoading }
/>
)) } )) }
</Tbody> </Tbody>
</Table> </Table>
......
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