Skip to content

Commit fdb9968

Browse files
committed
fix: unit tests passing
1 parent 2e47387 commit fdb9968

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

scripts/installer/frameworks/react/src/ui-framework/mui/form-context-wrapper.tsx

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,30 @@ import React from 'react';
55
import AdapterMoment from '@mui/lab/AdapterMoment';
66
import LocalizationProvider from '@mui/lab/LocalizationProvider';
77

8+
const LocalizationProviderContext: any = LocalizationProvider;
9+
810
const FormContextWrapper = ({
911
RenderFormButtons,
1012
children,
1113
actionButtonPos,
1214
hasPageLayoutSteps,
1315
isFormLoading
14-
}) => (<>
15-
{
16-
!isFormLoading && (actionButtonPos === 'top' && !hasPageLayoutSteps) && (
17-
<RenderFormButtons />
18-
)
19-
}
20-
<LocalizationProvider dateAdapter={AdapterMoment}>
21-
{children}
22-
</LocalizationProvider>
23-
{
24-
!isFormLoading && (!actionButtonPos && !hasPageLayoutSteps) && (
25-
<RenderFormButtons />
16+
}) => (
17+
<>
18+
{
19+
!isFormLoading && (actionButtonPos === 'top' && !hasPageLayoutSteps) && (
20+
<RenderFormButtons />
21+
)
22+
}
23+
<LocalizationProviderContext dateAdapter={AdapterMoment}>
24+
{children}
25+
</LocalizationProviderContext>
26+
{
27+
!isFormLoading && (!actionButtonPos && !hasPageLayoutSteps) && (
28+
<RenderFormButtons />
29+
)
30+
}
31+
</>
2632
)
27-
}
28-
</>)
2933

3034
export default FormContextWrapper;

0 commit comments

Comments
 (0)