File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,15 @@ export const changeImagePath = (imageSource: string) => ({
39
39
} )
40
40
41
41
export const loadInitData = ( ) => ( dispatch : ( arg : Action ) => void ) => {
42
- loadState ( ) . then ( ( data : any ) => dispatch ( {
42
+ loadState ( ) . then ( ( data : any ) => {
43
+ dispatch ( {
43
44
type : LOAD_INIT_DATA ,
44
45
payload : {
45
46
data : data ? data . workspace : { } ,
46
47
} ,
47
- } ) ) ;
48
+ } ) ;
49
+ console . log ( data ) ;
50
+ } ) ;
48
51
} ;
49
52
50
53
export const addComponent = ( { title } : { title : string } ) => ( dispatch : ( arg : Action ) => void ) => {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import LinearProgress from '@material-ui/core/LinearProgress';
5
5
import LeftContainer from './LeftContainer.tsx' ;
6
6
import MainContainer from './MainContainer.tsx' ;
7
7
import theme from '../components/theme.ts' ;
8
- import { loadInitData } from '../actions/components.ts' ;
8
+ // import { loadInitData } from '../actions/components.ts';
9
9
import { ComponentInt , ComponentsInt } from '../utils/Interfaces.ts' ;
10
10
import * as actions from '../actions/components' ;
11
11
@@ -40,7 +40,7 @@ const mapStateToProps = (store: any) => ({
40
40
} ) ;
41
41
42
42
const mapDispatchToProps = ( dispatch : any ) => ( {
43
- loadInitData,
43
+ loadInitData : ( ) => dispatch ( actions . loadInitData ( ) ) ,
44
44
changeImagePath : ( imageSource : string ) => dispatch ( actions . changeImagePath ( imageSource ) ) ,
45
45
} ) ;
46
46
You can’t perform that action at this time.
0 commit comments