Skip to content

Commit f3b5756

Browse files
Removed console.logs and commented lines
1 parent 9d5c5ae commit f3b5756

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

app/src/components/right/StatePropsPanel.tsx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
7575
value: typeConversion(inputValue, inputType),
7676
type: inputType,
7777
};
78-
// store this newStateProp obj to our Component's stateProps array
79-
// currentComponent.stateProps.push(newState);
80-
// reset newStateProp to empty for future new state prop entries
8178

8279
dispatch({
8380
type: 'ADD STATE',
@@ -86,20 +83,6 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
8683
clearForm();
8784
};
8885

89-
// generates React Hook code snippets for each new stateProp entry
90-
// const updateUseStateCodes = () => {
91-
// // array of snippets of state prop codes
92-
// const localStateCode = [];
93-
94-
// currentComponent.stateProps.forEach((stateProp) => {
95-
// const useStateCode = `const [${stateProp.key}, set${
96-
// stateProp.key.charAt(0).toUpperCase() + stateProp.key.slice(1)
97-
// }] = useState<${stateProp.type} | undefined>(${JSON.stringify(stateProp.value)})`;
98-
// localStateCode.push(useStateCode);
99-
// });
100-
// // store localStateCodes in global state context
101-
// return localStateCode;
102-
// };
10386

10487
// find table row using its id and if it exists, populate form with its details
10588
const handlerRowSelect = (table) => {
@@ -125,7 +108,7 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
125108
type: 'DELETE STATE',
126109
payload: {stateProps: filtered}
127110
});
128-
// updateUseStateCodes();
111+
129112
setStateProps(filtered);
130113
};
131114

app/src/reducers/componentReducer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,6 @@ const reducer = (state: State, action: Action) => {
778778

779779
currComponent.stateProps = action.payload.stateProps;
780780

781-
console.log(currComponent);
782781
currComponent.useStateCodes = updateUseStateCodes(currComponent);
783782

784783
currComponent.code = generateCode(

0 commit comments

Comments
 (0)