Skip to content

Commit 088d0f4

Browse files
authored
Merge pull request #14 from sean1292/staging
added typing in LeftContainer file
2 parents eade38b + 9a650d5 commit 088d0f4

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

src/components/LeftColExpansionPanel.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Fragment, useEffect } from 'react';
1+
import React, { Fragment } from 'react';
22
import { withStyles } from '@material-ui/core/styles';
33
import Typography from '@material-ui/core/Typography';
44
import List from '@material-ui/core/List';
@@ -31,9 +31,6 @@ const LeftColExpansionPanel = (props: any) => {
3131
} = props;
3232

3333
const { title, id, color, stateful, classBased } = component;
34-
useEffect(() => {
35-
console.log('title: ', title);
36-
});
3734

3835
function isFocused() {
3936
return focusComponent.id === id ? 'focused' : '';

src/containers/LeftContainer.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ interface PropsInt {
2626
focusComponent: ComponentInt;
2727
selectableChildren: Array<number>;
2828
classes: any;
29-
addComponent: any;
30-
addChild: any;
31-
changeFocusComponent: any;
32-
changeFocusChild: any;
33-
deleteComponent: any;
34-
createApp: any;
35-
deleteAllData: any;
36-
toggleComponentState: any;
37-
toggleComponentClass: any;
38-
deleteImage: any;
29+
addComponent: (arg: { title: string }) => void;
30+
addChild: (arg: { title: string; childType: string; HTMLInfo: object }) => void;
31+
changeFocusComponent: (arg: { title: string }) => void;
32+
changeFocusChild: (arg: { childId: number }) => void;
33+
deleteComponent: (arg: { componentId: number; stateComponents: ComponentsInt }) => void;
34+
createApp: (arg: { path: string; components: ComponentsInt; genOption: number }) => void;
35+
deleteAllData: () => void;
36+
toggleComponentState: (arg: string) => void;
37+
toggleComponentClass: (arg: string) => void;
38+
deleteImage: () => void;
3939
}
4040

4141
interface StateInt {
@@ -240,7 +240,7 @@ class LeftContainer extends Component<PropsInt, StateInt> {
240240
toggleComponentClass={toggleComponentClass}
241241
/>
242242
));
243-
const { addImage, clearImage } = this;
243+
const { addImage } = this;
244244

245245
return (
246246
<div className="column left">

0 commit comments

Comments
 (0)