@@ -75,9 +75,6 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
75
75
value : typeConversion ( inputValue , inputType ) ,
76
76
type : inputType ,
77
77
} ;
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
81
78
82
79
dispatch ( {
83
80
type : 'ADD STATE' ,
@@ -86,20 +83,6 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
86
83
clearForm ( ) ;
87
84
} ;
88
85
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
- // };
103
86
104
87
// find table row using its id and if it exists, populate form with its details
105
88
const handlerRowSelect = ( table ) => {
@@ -125,7 +108,7 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
125
108
type : 'DELETE STATE' ,
126
109
payload : { stateProps : filtered }
127
110
} ) ;
128
- // updateUseStateCodes();
111
+
129
112
setStateProps ( filtered ) ;
130
113
} ;
131
114
0 commit comments