Lint
This commit is contained in:
parent
a10eb02a40
commit
0b2d2dca6d
|
@ -167,7 +167,13 @@ export default function Content(): JSX.Element {
|
||||||
controller.abort();
|
controller.abort();
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
}, [ query.term, query.category ] ); // Depend on term and category
|
}, [
|
||||||
|
query.term,
|
||||||
|
query.category,
|
||||||
|
setHasBusinessServices,
|
||||||
|
setIsLoading,
|
||||||
|
setSearchResultsCount,
|
||||||
|
] ); // Depend on term and category
|
||||||
|
|
||||||
// Filter the products based on the selected tab
|
// Filter the products based on the selected tab
|
||||||
useEffect( () => {
|
useEffect( () => {
|
||||||
|
|
|
@ -67,7 +67,7 @@ export default function NoResults( props: {
|
||||||
.finally( () => {
|
.finally( () => {
|
||||||
setIsLoading( false );
|
setIsLoading( false );
|
||||||
} );
|
} );
|
||||||
}, [] );
|
}, [ productGroupsForSearchType, props.type ] );
|
||||||
|
|
||||||
function productListTitle( groupId: string ) {
|
function productListTitle( groupId: string ) {
|
||||||
if ( groupId === 'popular-themes' ) {
|
if ( groupId === 'popular-themes' ) {
|
||||||
|
|
|
@ -178,7 +178,7 @@ const Tabs = ( props: TabsProps ): JSX.Element => {
|
||||||
} else if ( Object.keys( query ).length > 0 ) {
|
} else if ( Object.keys( query ).length > 0 ) {
|
||||||
setSelectedTab( DEFAULT_TAB_KEY );
|
setSelectedTab( DEFAULT_TAB_KEY );
|
||||||
}
|
}
|
||||||
}, [ query, setSelectedTab ] );
|
}, [ query, setSelectedTab, tabs ] );
|
||||||
|
|
||||||
useEffect( () => {
|
useEffect( () => {
|
||||||
setVisibleTabs(
|
setVisibleTabs(
|
||||||
|
@ -188,7 +188,7 @@ const Tabs = ( props: TabsProps ): JSX.Element => {
|
||||||
if ( selectedTab === 'business-services' && ! hasBusinessServices ) {
|
if ( selectedTab === 'business-services' && ! hasBusinessServices ) {
|
||||||
setUrlTabParam( 'extensions', query );
|
setUrlTabParam( 'extensions', query );
|
||||||
}
|
}
|
||||||
}, [ selectedTab, hasBusinessServices ] );
|
}, [ selectedTab, hasBusinessServices, query, tabs ] );
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav
|
<nav
|
||||||
|
|
Loading…
Reference in New Issue