Skip to content

Commit

Permalink
Add wccom_from and oauth2_client_id to getRecordProps() in Signup com…
Browse files Browse the repository at this point in the history
…ponent
  • Loading branch information
chihsuan committed Mar 22, 2024
1 parent a02e3be commit c69ce73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/signup/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import {
} from 'calypso/state/current-user/selectors';
import { getCurrentOAuth2Client } from 'calypso/state/oauth2-clients/ui/selectors';
import getCurrentLocaleSlug from 'calypso/state/selectors/get-current-locale-slug';
import getWccomFrom from 'calypso/state/selectors/get-wccom-from';
import isDomainOnlySite from 'calypso/state/selectors/is-domain-only-site';
import isUserRegistrationDaysWithinRange from 'calypso/state/selectors/is-user-registration-days-within-range';
import { getSignupDependencyStore } from 'calypso/state/signup/dependency-store/selectors';
Expand Down Expand Up @@ -329,7 +330,7 @@ class Signup extends Component {
};

getRecordProps() {
const { signupDependencies, hostingFlow, queryObject } = this.props;
const { signupDependencies, hostingFlow, queryObject, wccomFrom, oauth2Client } = this.props;
const mainFlow = queryObject?.main_flow;

let theme = get( signupDependencies, 'selectedDesign.theme' );
Expand All @@ -346,6 +347,8 @@ class Signup extends Component {
intent: get( signupDependencies, 'intent' ),
starting_point: get( signupDependencies, 'startingPoint' ),
is_in_hosting_flow: hostingFlow,
wccom_from: wccomFrom,
oauth2_client_id: oauth2Client?.id,
...( mainFlow ? { flow: mainFlow } : {} ),
};
}
Expand Down Expand Up @@ -965,6 +968,7 @@ export default connect(
localeSlug: getCurrentLocaleSlug( state ),
oauth2Client,
isGravatar: isGravatarOAuth2Client( oauth2Client ),
wccomFrom: getWccomFrom( state ),
hostingFlow,
};
},
Expand Down

0 comments on commit c69ce73

Please sign in to comment.