From adc3a9651eb095142a7f38e1ea5ec6a93793bb35 Mon Sep 17 00:00:00 2001 From: arthur Date: Tue, 24 Dec 2024 17:05:15 +0800 Subject: [PATCH] Fix types --- .../internals/steps-repository/difm-starting-point/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/landing/stepper/declarative-flow/internals/steps-repository/difm-starting-point/index.tsx b/client/landing/stepper/declarative-flow/internals/steps-repository/difm-starting-point/index.tsx index df02859faed79..76f038e8f901d 100644 --- a/client/landing/stepper/declarative-flow/internals/steps-repository/difm-starting-point/index.tsx +++ b/client/landing/stepper/declarative-flow/internals/steps-repository/difm-starting-point/index.tsx @@ -7,14 +7,15 @@ import { recordTracksEvent } from 'calypso/lib/analytics/tracks'; import DIFMLanding from 'calypso/my-sites/marketing/do-it-for-me/difm-landing'; import { getCurrentUserSiteCount } from 'calypso/state/current-user/selectors'; import type { Step } from '../../types'; +import type { AppState } from 'calypso/types'; const STEP_NAME = 'difmStartingPoint'; const DIFMStartingPoint: Step = function ( { navigation } ) { const { goNext, goBack, submit } = navigation; const translate = useTranslate(); - const existingSiteCount = useSelector( ( state ) => getCurrentUserSiteCount( state ) ); + const existingSiteCount = useSelector( ( state: AppState ) => getCurrentUserSiteCount( state ) ); const siteId = useSite()?.ID; - const showNewOrExistingSiteChoice = ! siteId && existingSiteCount > 0; + const showNewOrExistingSiteChoice = ! siteId && !! existingSiteCount && existingSiteCount > 0; const onSubmit = ( value: string ) => { submit?.( {