File size: 1,044 Bytes
1e92f2d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | import { useTranslate } from 'i18n-calypso';
import React from 'react';
import { useSelector } from 'react-redux';
import StepWrapper from 'calypso/signup/step-wrapper';
import { getCurrentUserSiteCount } from 'calypso/state/current-user/selectors';
import { HostingFlowForkingPage } from './hosting-flow-forking-page';
export type StepProps = {
stepSectionName: string | null;
stepName: string;
flowName: string;
goToStep: () => void;
goToNextStep: () => void;
submitSignupStep: ( step: any, dependencies: any ) => void;
};
export default function HostingDecider( props: StepProps ) {
const translate = useTranslate();
const siteCount = useSelector( getCurrentUserSiteCount );
const headerText =
siteCount === 0 ? translate( 'Let’s add your first site' ) : translate( 'Let’s add a site' );
return (
<StepWrapper
headerText={ headerText }
fallbackHeaderText={ headerText }
subHeaderText=""
fallbackSubHeaderText=""
stepContent={ <HostingFlowForkingPage { ...props } /> }
hideSkip
{ ...props }
/>
);
}
|