Skip to content

Commit

Permalink
Revert "Signup: Use Redux for user fetching in signup actions (#53782)…
Browse files Browse the repository at this point in the history
…" (#53829)

This reverts commit 5e8919b.
  • Loading branch information
sirbrillig authored Jun 18, 2021
1 parent 4c8b150 commit ed034c0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions client/lib/signup/step-actions/fetch-sites-and-user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/**
* Internal dependencies
*/
import { fetchCurrentUser } from 'calypso/state/current-user/actions';
import user from 'calypso/lib/user';

// State actions and selectors
import { getSiteId } from 'calypso/state/sites/selectors';
import { requestSites } from 'calypso/state/sites/actions';

Expand All @@ -12,8 +14,7 @@ async function fetchSitesUntilSiteAppears( siteSlug, reduxStore ) {
}

export function fetchSitesAndUser( siteSlug, onComplete, reduxStore ) {
Promise.all( [
fetchSitesUntilSiteAppears( siteSlug, reduxStore ),
reduxStore.dispatch( fetchCurrentUser() ),
] ).then( onComplete );
Promise.all( [ fetchSitesUntilSiteAppears( siteSlug, reduxStore ), user().fetch() ] ).then(
onComplete
);
}

0 comments on commit ed034c0

Please sign in to comment.