@@ -28,7 +28,6 @@ import type { Integration } from '../../../types/index.ts';
2828
2929type UseInstallAkismetReturn = {
3030 shouldShowAkismetCta : boolean ;
31- isIntegrationsLoading : boolean ;
3231 wrapperBody : string ;
3332 isInstallingAkismet : boolean ;
3433 canPerformAkismetAction : boolean ;
@@ -48,20 +47,16 @@ type EmptyResponsesProps = {
4847 * @return {UseInstallAkismetReturn } An object containing the necessary data and functions to handle Akismet installation and activation.
4948 */
5049const useInstallAkismet = ( ) : UseInstallAkismetReturn => {
51- const { akismetIntegration, isIntegrationsLoading } = useSelect (
52- ( select : SelectIntegrations ) => {
53- const store = select ( INTEGRATIONS_STORE ) ;
54- const integrations = store . getIntegrations ( ) || [ ] ;
55-
56- return {
57- akismetIntegration : integrations . find (
58- ( integration : Integration ) => integration . id === 'akismet'
59- ) ,
60- isIntegrationsLoading : store . isIntegrationsLoading ( ) ,
61- } ;
62- } ,
63- [ ]
64- ) as { akismetIntegration ?: Integration ; isIntegrationsLoading : boolean } ;
50+ const { akismetIntegration } = useSelect ( ( select : SelectIntegrations ) => {
51+ const store = select ( INTEGRATIONS_STORE ) ;
52+ const integrations = store . getIntegrations ( ) || [ ] ;
53+
54+ return {
55+ akismetIntegration : integrations . find (
56+ ( integration : Integration ) => integration . id === 'akismet'
57+ ) ,
58+ } ;
59+ } , [ ] ) as { akismetIntegration ?: Integration } ;
6560
6661 const { refreshIntegrations } = useDispatch ( INTEGRATIONS_STORE ) as IntegrationsDispatch ;
6762
@@ -142,7 +137,6 @@ const useInstallAkismet = (): UseInstallAkismetReturn => {
142137
143138 return {
144139 shouldShowAkismetCta,
145- isIntegrationsLoading,
146140 wrapperBody,
147141 isInstallingAkismet,
148142 canPerformAkismetAction,
@@ -167,7 +161,6 @@ const EmptyResponses = ( { status, isSearch, readStatusFilter }: EmptyResponsesP
167161 const emptyTrashDays = useConfigValue ( 'emptyTrashDays' ) ?? 0 ;
168162 const {
169163 shouldShowAkismetCta,
170- isIntegrationsLoading,
171164 wrapperBody,
172165 isInstallingAkismet,
173166 canPerformAkismetAction,
@@ -210,7 +203,7 @@ const EmptyResponses = ( { status, isSearch, readStatusFilter }: EmptyResponsesP
210203 ) ;
211204
212205 if ( status === 'spam' ) {
213- if ( shouldShowAkismetCta && ! isIntegrationsLoading ) {
206+ if ( shouldShowAkismetCta ) {
214207 return (
215208 < EmptyWrapper
216209 heading = { noSpamHeading }
0 commit comments