File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 5
5
* - All imports should be optional based on what gets selected
6
6
*/
7
7
// Library
8
- import React from 'react' ;
9
- import { nanoid as generate } from 'nanoid' ;
8
+ import Framework from './universal-schema/react.framework' ;
9
+ const {
10
+ React,
11
+ nanoId : generate ,
12
+ } = Framework . library ;
10
13
11
14
// Material UI
12
15
import { MuiPickersUtilsProvider } from '@material-ui/pickers' ; // Has to be made optional
@@ -16,7 +19,6 @@ import CircularProgress from '@material-ui/core/CircularProgress';
16
19
17
20
// Types
18
21
import { FormProps } from '@core-types/Form.type' ;
19
- import Framework from './universal-schema/react.framework' ;
20
22
21
23
// Internal
22
24
import formStyles from './form-styles' ;
@@ -34,11 +36,6 @@ import {
34
36
// Initial Contexts
35
37
import { LoadingContext , EventContext , StepperContext } from './helpers/context' ;
36
38
37
- // const {
38
- // React,
39
- // nanoId: generate,
40
- // } = Framework.library;
41
-
42
39
const Form = ( {
43
40
formData : originalFormData ,
44
41
schema = { } ,
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import { UniversalSchemaFramework } from './types/universal-schema-framework.typ
2
2
3
3
const Framework : UniversalSchemaFramework = {
4
4
library : {
5
- React : import ( 'react' ) ,
6
- nanoId : async ( ) => ( await import ( 'nanoid' ) ) . nanoid ,
5
+ React : require ( 'react' ) ,
6
+ nanoId : require ( 'nanoid' ) . nanoid ,
7
7
} ,
8
8
uiFramework : {
9
9
name : 'MaterialUI' ,
You can’t perform that action at this time.
0 commit comments