@@ -31,12 +31,6 @@ export interface CheckoutAppProps {
31
31
const CheckoutApp = ( props : CheckoutAppProps ) : ReactElement => {
32
32
const { containerId, sentryConfig, publicPath, sentrySampleRate } = props ;
33
33
34
- const checkoutService = useMemo ( ( ) => createCheckoutService ( {
35
- locale : getLanguageService ( ) . getLocale ( ) ,
36
- shouldWarnMutation : process . env . NODE_ENV === 'development' ,
37
- } ) , [ ] ) ;
38
- const embeddedStylesheet = useMemo ( ( ) => createEmbeddedCheckoutStylesheet ( ) , [ ] ) ;
39
- const embeddedSupport = useMemo ( ( ) => createEmbeddedCheckoutSupport ( getLanguageService ( ) ) , [ ] ) ;
40
34
const errorLogger = useMemo ( ( ) => createErrorLogger (
41
35
{ sentry : sentryConfig } ,
42
36
{
@@ -45,6 +39,13 @@ const CheckoutApp = (props: CheckoutAppProps): ReactElement => {
45
39
sampleRate : sentrySampleRate || 0.1 ,
46
40
} ,
47
41
) , [ ] ) ;
42
+ const checkoutService = useMemo ( ( ) => createCheckoutService ( {
43
+ locale : getLanguageService ( ) . getLocale ( ) ,
44
+ shouldWarnMutation : process . env . NODE_ENV === 'development' ,
45
+ errorLogger,
46
+ } ) , [ ] ) ;
47
+ const embeddedStylesheet = useMemo ( ( ) => createEmbeddedCheckoutStylesheet ( ) , [ ] ) ;
48
+ const embeddedSupport = useMemo ( ( ) => createEmbeddedCheckoutSupport ( getLanguageService ( ) ) , [ ] ) ;
48
49
49
50
useEffect ( ( ) => {
50
51
ReactModal . setAppElement ( `#${ containerId } ` ) ;
0 commit comments