Skip to content

Commit a08b0ef

Browse files
committed
in App container removed import ObjToIds passing on compoenents direct from state. Also removed some unused props
1 parent 8c8bf36 commit a08b0ef

File tree

5 files changed

+15
-17
lines changed

5 files changed

+15
-17
lines changed

src/containers/AppContainer.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import LinearProgress from '@material-ui/core/LinearProgress';
66
import LeftContainer from './LeftContainer.jsx';
77
import MainContainer from './MainContainer.jsx';
88
// import RightContainer from './RightContainer.jsx';
9-
import convertIdsToObjs from '../utils/convertIdsToObjs.util';
9+
// import convertIdsToObjs from '../utils/convertIdsToObjs.util';
1010
import theme from '../components/theme.ts';
1111
import { loadInitData } from '../actions/components';
1212

@@ -46,28 +46,28 @@ class AppContainer extends Component {
4646

4747
render() {
4848
const {
49-
components, totalComponents, focusComponent, loading, selectableChildren,
49+
components, focusComponent, loading, selectableChildren,
5050
} = this.props;
5151
const { width, rightColumnOpen } = this.state;
5252

5353
// uses component childIds and parentIds arrays (numbers) to build component-filled children and parents arrays
54-
const updatedComponents = convertIdsToObjs(components);
54+
//const updatedComponents = convertIdsToObjs(components);
5555

5656
return (
5757
<MuiThemeProvider theme={theme}>
5858
<div className="app-container">
5959
<LeftContainer
60-
components={updatedComponents}
61-
totalComponents={totalComponents}
60+
components={components}
61+
// totalComponents={totalComponents}
6262
focusComponent={focusComponent}
6363
selectableChildren={selectableChildren}
6464
/>
6565
<MainContainer
66-
components={updatedComponents}
66+
components={components}
6767
collapseColumn={this.collapseColumn}
6868
width={width}
6969
rightColumnOpen={rightColumnOpen}
70-
totalComponents={totalComponents}
70+
// totalComponents={totalComponents}
7171
/>
7272
{/* <RightContainer
7373
width={width}

src/containers/LeftContainer.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ class LeftContainer extends Component {
6060
render() {
6161
const {
6262
components,
63-
updateComponent,
6463
deleteComponent,
6564
focusComponent,
66-
totalComponents,
6765
classes,
6866
addChild,
6967
changeFocusComponent,

src/containers/MainContainer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const mapDispatchToProps = dispatch => ({
4848
});
4949

5050
const mapStateToProps = store => ({
51-
totalComponents: store.workspace.totalComponents,
51+
// totalComponents: store.workspace.totalComponents,
5252
focusComponent: store.workspace.focusComponent,
5353
focusChild: store.workspace.focusChild,
5454
stateComponents: store.workspace.components,

src/reducers/componentReducer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ const componentReducer = (state = initialApplicationState, action) => {
169169
case HANDLE_TRANSFORM:
170170
return handleTransform(state, action.payload);
171171

172-
case MOVE_TO_BOTTOM:
173-
return moveToBottom(state, action.payload);
174-
case MOVE_TO_TOP:
175-
return moveToTop(state, action.payload);
172+
// case MOVE_TO_BOTTOM:
173+
// return moveToBottom(state, action.payload);
174+
// case MOVE_TO_TOP:
175+
// return moveToTop(state, action.payload);
176176
case OPEN_EXPANSION_PANEL:
177177
return openExpansionPanel(state, action.payload);
178178
case DELETE_ALL_DATA:

src/utils/findComponentById.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ interface Component {
3131
parentIds: number[];
3232
color: string;
3333
draggable: boolean;
34-
childrenIds: number[];
35-
selectableParents?: any[]; // unused
36-
expanded?: boolean; // unused
34+
// childrenIds: number[];
35+
// selectableParents?: any[]; // unused
36+
// expanded?: boolean; // unused
3737
props: Prop[];
3838
nextPropId: number;
3939
position: Position;

0 commit comments

Comments
 (0)