Skip to content

Commit

Permalink
Revert "Reader: reader and account flows set Reader as the user's…
Browse files Browse the repository at this point in the history
… default…"

This reverts commit 80675dc.
  • Loading branch information
DustyReagan authored Feb 7, 2025
1 parent 80675dc commit 7575526
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
18 changes: 0 additions & 18 deletions client/signup/config/flows-pure.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { isEnabled } from '@automattic/calypso-config';
import { HOSTING_LP_FLOW, ONBOARDING_FLOW, ONBOARDING_GUIDED_FLOW } from '@automattic/onboarding';
import { translate } from 'i18n-calypso';
import { savePreference } from 'calypso/state/preferences/actions';
import { READER_AS_LANDING_PAGE_PREFERENCE } from 'calypso/state/sites/selectors/has-reader-as-landing-page';

const noop = () => {};

Expand Down Expand Up @@ -92,14 +90,6 @@ export function generateFlows( {
providesDependenciesInQuery: [ 'toStepper' ],
optionalDependenciesInQuery: [ 'toStepper' ],
hideProgressIndicator: true,
postCompleteCallback: async ( { dispatch } ) => {
dispatch(
savePreference( READER_AS_LANDING_PAGE_PREFERENCE, {
useReaderAsLandingPage: true,
updatedAt: Date.now(),
} )
);
},
},
{
name: 'business',
Expand Down Expand Up @@ -382,14 +372,6 @@ export function generateFlows( {
lastModified: '2025-01-28',
showRecaptcha: true,
hideProgressIndicator: true,
postCompleteCallback: async ( { dispatch } ) => {
dispatch(
savePreference( READER_AS_LANDING_PAGE_PREFERENCE, {
useReaderAsLandingPage: true,
updatedAt: Date.now(),
} )
);
},
},
{
name: 'crowdsignal',
Expand Down
13 changes: 4 additions & 9 deletions client/signup/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,7 @@ class Signup extends Component {

if ( flow.postCompleteCallback ) {
const siteId = dependencies && dependencies.siteId;
await flow.postCompleteCallback( {
siteId,
flowName: this.props.flowName,
dispatch: this.props.dispatch,
} );
await flow.postCompleteCallback( { siteId, flowName: this.props.flowName } );
}
};

Expand Down Expand Up @@ -635,7 +631,7 @@ class Signup extends Component {
dependencies.oauth2_client_id && ! progress?.[ 'oauth2-user' ]?.service; // service is set for social signup (e.g. Google, Apple)
// If the user is not logged in, we need to log them in first.
// And if it's regular oauth client signup, we perform the oauth login because the WPCC user creation code automatically logs the user in.
// There's no need to turn the bearer token into a cookie. If we log user in again, it will cause an activation error.
// Theres no need to turn the bearer token into a cookie. If we log user in again, it will cause an activation error.
// However, we need to skip this to perform a regular login for social sign in.
if ( ! userIsLoggedIn && ( config.isEnabled( 'oauth' ) || isRegularOauth2ClientSignup ) ) {
debug( `Handling oauth login` );
Expand Down Expand Up @@ -1016,10 +1012,9 @@ export default connect(
hostingFlow,
};
},
( dispatch ) => ( {
dispatch,
{
submitSignupStep,
removeStep,
addStep,
} )
}
)( Signup );

0 comments on commit 7575526

Please sign in to comment.