Commit 7131ec5b authored by isstuev's avatar isstuev

action bar fix

parent a53eae04
...@@ -5,6 +5,7 @@ import React from 'react'; ...@@ -5,6 +5,7 @@ import React from 'react';
import type { VerifiedContractsFilters } from 'types/api/contracts'; import type { VerifiedContractsFilters } from 'types/api/contracts';
import useDebounce from 'lib/hooks/useDebounce'; import useDebounce from 'lib/hooks/useDebounce';
import useIsMobile from 'lib/hooks/useIsMobile';
import useQueryWithPages from 'lib/hooks/useQueryWithPages'; import useQueryWithPages from 'lib/hooks/useQueryWithPages';
import { apos } from 'lib/html-entities'; import { apos } from 'lib/html-entities';
import getQueryParamString from 'lib/router/getQueryParamString'; import getQueryParamString from 'lib/router/getQueryParamString';
...@@ -29,6 +30,8 @@ const VerifiedContracts = () => { ...@@ -29,6 +30,8 @@ const VerifiedContracts = () => {
const debouncedSearchTerm = useDebounce(searchTerm || '', 300); const debouncedSearchTerm = useDebounce(searchTerm || '', 300);
const isMobile = useIsMobile();
const { isError, isLoading, data, isPaginationVisible, pagination, onFilterChange } = useQueryWithPages({ const { isError, isLoading, data, isPaginationVisible, pagination, onFilterChange } = useQueryWithPages({
resourceName: 'verified_contracts', resourceName: 'verified_contracts',
filters: { q: debouncedSearchTerm, filter: type }, filters: { q: debouncedSearchTerm, filter: type },
...@@ -87,6 +90,7 @@ const VerifiedContracts = () => { ...@@ -87,6 +90,7 @@ const VerifiedContracts = () => {
{ sortButton } { sortButton }
{ filterInput } { filterInput }
</HStack> </HStack>
{ (!isMobile || isPaginationVisible) && (
<ActionBar mt={ -6 }> <ActionBar mt={ -6 }>
<HStack spacing={ 3 } display={{ base: 'none', lg: 'flex' }}> <HStack spacing={ 3 } display={{ base: 'none', lg: 'flex' }}>
{ typeFilter } { typeFilter }
...@@ -94,6 +98,7 @@ const VerifiedContracts = () => { ...@@ -94,6 +98,7 @@ const VerifiedContracts = () => {
</HStack> </HStack>
{ isPaginationVisible && <Pagination ml="auto" { ...pagination }/> } { isPaginationVisible && <Pagination ml="auto" { ...pagination }/> }
</ActionBar> </ActionBar>
) }
</> </>
); );
......
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