Skip to content

Commit d8c27ea

Browse files
committed
cleanup comments
1 parent bd83597 commit d8c27ea

File tree

3 files changed

+2
-43
lines changed

3 files changed

+2
-43
lines changed

app/src/containers/CustomizationPanel.tsx

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
4949
const [modal, setModal] = useState(null);
5050
const [useContextObj, setUseContextObj] = useState({});
5151
const [stateUsedObj, setStateUsedObj] = useState({});
52-
// ------------------------------------------- added code below -------------------------------------------
5352
const [eventAll, setEventAll] = useState(['', '']);
5453
const [eventRow, setEventRow] = useState([]);
55-
// ------------------------------------------- added code above -------------------------------------------
54+
5655
const currFocus = getFocus().child;
5756

5857
useEffect( () => {
@@ -142,14 +141,12 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
142141
case 'cssClasses':
143142
setCssClasses(inputVal);
144143
break;
145-
// ------------------------------------------- added code below -------------------------------------------
146144
case 'event':
147145
setEventAll(inputVal ? [inputVal, `handle${inputVal.slice(2)}`] : ['', '']);
148146
break;
149147
case 'funcName':
150148
setEventAll([eventAll[0], inputVal]);
151149
break;
152-
// ------------------------------------------- added code above -------------------------------------------
153150
default:
154151
break;
155152
}
@@ -309,7 +306,6 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
309306

310307

311308
const handleSave = (): Object => {
312-
// ------------------------------------------- change code below -------------------------------------------
313309
dispatch({
314310
type: 'UPDATE STATE USED',
315311
payload: {stateUsedObj: stateUsedObj}
@@ -348,7 +344,6 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
348344
type: 'UPDATE EVENTS',
349345
payload: { events: eventsObj }
350346
});
351-
// ------------------------------------------- change code above -------------------------------------------
352347
return styleObj;
353348
};
354349
// UNDO/REDO functionality--onClick these functions will be invoked.
@@ -732,7 +727,6 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
732727
</FormControl>
733728
</div>
734729
</div>
735-
{/* ------------------------------------------- added new code------------------------------------------- */}
736730
<div>
737731
<FormSelector
738732
classes={classes}
@@ -780,40 +774,8 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
780774
rows={eventRow}
781775
columns={eventColumnTabs}
782776
pageSize={5}
783-
// editRowsModel={editRowsModel}
784-
// className={props.isThemeLight ? classes.themeLight : classes.themeDark}
785777
/>
786778
</div>)}
787-
{/* <TableContainer component={Paper} sx={{ maxHeight: '350px' }}>
788-
<Table
789-
sx={{ width: '510px' }}
790-
aria-label="customized table"
791-
stickyHeader
792-
>
793-
<TableHead>
794-
<TableRow>
795-
<StyledTableCell align="center" colSpan={3}>
796-
Added Event
797-
</StyledTableCell>
798-
</TableRow>
799-
</TableHead>
800-
<TableBody>
801-
<StyledTableRow>
802-
<StyledTableCell component="th" scope="row"><b>Event</b></StyledTableCell>
803-
<StyledTableCell align="right"><b>FuncName</b></StyledTableCell>
804-
<StyledTableCell align="right"><b>X</b></StyledTableCell>
805-
</StyledTableRow>
806-
{currComponentState ? currComponentState.map((data, index) => (
807-
<StyledTableRow key={index}>
808-
<StyledTableCell component="th" scope="row">{data.key}</StyledTableCell>
809-
<StyledTableCell align="right">{data.type}</StyledTableCell>
810-
<StyledTableCell align="right">{data.value}</StyledTableCell>
811-
</StyledTableRow>
812-
)) : ''}
813-
</TableBody>
814-
</Table>
815-
</TableContainer> */}
816-
{/* ------------------------------------------- added from above -------------------------------------------*/}
817779
</div>
818780
<div>
819781
<div className={classes.buttonRow}>

app/src/containers/LeftContainer.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,4 @@ const LeftContainer = (props): JSX.Element => {
4343
);
4444
};
4545

46-
{/* <div className="arrow-right"></div> */}
47-
4846
export default LeftContainer;

app/src/helperFunctions/generateCode.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,6 @@ const generateUnformattedCode = (
391391
return importStr;
392392
};
393393

394-
// ------------------------------------------- added code below -------------------------------------------
395394
const createEventHandler = (children) => {
396395
let importStr = '';
397396
children.map((child) => {
@@ -407,7 +406,7 @@ const generateUnformattedCode = (
407406

408407
return importStr;
409408
};
410-
// ------------------------------------------- added code above -------------------------------------------
409+
411410
let generatedCode = "import React, { useState, useEffect, useContext} from 'react';\n\n";
412411
generatedCode += currComponent.name === 'APP' ? contextImports : '';
413412
generatedCode += importReactRouter ? `import { BrowserRouter as Router, Route, Switch, Link } from 'react-router-dom';\n` : ``;

0 commit comments

Comments
 (0)