Commit 8d116569 authored by tom's avatar tom

add space in the bottom of the address and token pages

parent 3fea5ac2
...@@ -5,7 +5,7 @@ import omit from 'lodash/omit'; ...@@ -5,7 +5,7 @@ import omit from 'lodash/omit';
import pick from 'lodash/pick'; import pick from 'lodash/pick';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import React, { useCallback } from 'react'; 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 type { PaginatedResources, PaginatedResponse, PaginationFilters } from 'lib/api/resources';
import { RESOURCES } from 'lib/api/resources'; import { RESOURCES } from 'lib/api/resources';
...@@ -25,7 +25,7 @@ export default function useQueryWithPages<Resource extends PaginatedResources>({ ...@@ -25,7 +25,7 @@ export default function useQueryWithPages<Resource extends PaginatedResources>({
filters, filters,
options, options,
pathParams, pathParams,
// scrollRef, scrollRef,
}: Params<Resource>) { }: Params<Resource>) {
const resource = RESOURCES[resourceName]; const resource = RESOURCES[resourceName];
const queryClient = useQueryClient(); const queryClient = useQueryClient();
...@@ -47,8 +47,8 @@ export default function useQueryWithPages<Resource extends PaginatedResources>({ ...@@ -47,8 +47,8 @@ export default function useQueryWithPages<Resource extends PaginatedResources>({
const queryParams = { ...pageParams[page], ...filters }; const queryParams = { ...pageParams[page], ...filters };
const scrollToTop = useCallback(() => { const scrollToTop = useCallback(() => {
// scrollRef?.current ? scrollRef.current.scrollIntoView(true) : animateScroll.scrollToTop({ duration: 0 }); scrollRef?.current ? scrollRef.current.scrollIntoView(true) : animateScroll.scrollToTop({ duration: 0 });
}, [ ]); }, [ scrollRef ]);
const queryResult = useApiQuery(resourceName, { const queryResult = useApiQuery(resourceName, {
pathParams, pathParams,
......
...@@ -141,6 +141,7 @@ const AddressPageContent = () => { ...@@ -141,6 +141,7 @@ const AddressPageContent = () => {
{ /* should stay before tabs to scroll up whith pagination */ } { /* should stay before tabs to scroll up whith pagination */ }
<Box ref={ tabsScrollRef }></Box> <Box ref={ tabsScrollRef }></Box>
{ addressQuery.isLoading ? <SkeletonTabs/> : content } { addressQuery.isLoading ? <SkeletonTabs/> : content }
{ !addressQuery.isLoading && !addressQuery.isError && <Box h={{ base: 0, lg: '40vh' }}/> }
</Page> </Page>
); );
}; };
......
...@@ -146,6 +146,8 @@ const TokenPageContent = () => { ...@@ -146,6 +146,8 @@ const TokenPageContent = () => {
stickyEnabled={ !isMobile } stickyEnabled={ !isMobile }
/> />
) } ) }
{ !tokenQuery.isLoading && !tokenQuery.isError && <Box h={{ base: 0, lg: '40vh' }}/> }
</Page> </Page>
); );
}; };
......
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