add: lys prefetch congrats data (#46406)
This commit is contained in:
parent
5a57525bd6
commit
09b002cb50
|
@ -8,6 +8,7 @@ import {
|
|||
fromCallback,
|
||||
fromPromise,
|
||||
assign,
|
||||
spawnChild,
|
||||
} from 'xstate5';
|
||||
import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
|
@ -23,6 +24,7 @@ import type { LaunchYourStoreComponentProps } from '..';
|
|||
import type { mainContentMachine } from '../main-content/xstate';
|
||||
import { updateQueryParams, createQueryParamsListener } from '../common';
|
||||
import { taskClickedAction, getLysTasklist } from './tasklist';
|
||||
import { fetchCongratsData } from '../main-content/pages/launch-store-success/services';
|
||||
|
||||
export type SidebarMachineContext = {
|
||||
externalUrl: string | null;
|
||||
|
@ -116,6 +118,7 @@ export const sidebarMachine = setup( {
|
|||
sidebarQueryParamListener,
|
||||
getTasklist: fromPromise( getLysTasklist ),
|
||||
updateLaunchStoreOptions: fromPromise( launchStoreAction ),
|
||||
fetchCongratsData,
|
||||
},
|
||||
} ).createMachine( {
|
||||
id: 'sidebar',
|
||||
|
@ -155,6 +158,11 @@ export const sidebarMachine = setup( {
|
|||
initial: 'preLaunchYourStoreHub',
|
||||
states: {
|
||||
preLaunchYourStoreHub: {
|
||||
entry: [
|
||||
spawnChild( 'fetchCongratsData', {
|
||||
id: 'prefetch-congrats-data ',
|
||||
} ),
|
||||
],
|
||||
invoke: {
|
||||
src: 'getTasklist',
|
||||
onDone: {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: add
|
||||
|
||||
Adds a prefetch for the LYS congrats data
|
||||
|
Loading…
Reference in New Issue