Skip to content

Commit 6d2ab24

Browse files
committed
2 parents 153a946 + 2fd5bef commit 6d2ab24

File tree

4 files changed

+3
-13
lines changed

4 files changed

+3
-13
lines changed

src/components/bottom/Props.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ const availablePropTypes = {
5151
boolean: 'BOOL',
5252
function: 'FUNC',
5353
any: 'ANY',
54-
tuple: 'TUP',
55-
enum: 'ENUM'
54+
tuple: 'TUP'
5655
};
5756

5857
// generates the various options for the prop type selection

src/containers/AppContainer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ class AppContainer extends Component<Props, State> {
156156
image.src = 'images/iphone.png';
157157
image.onload = () => {
158158
// update state when the image has been uploaded
159-
this.props.changeImagePath(image.src);
160159
this.setState({ nativeImageElement: image });
161160
this.props.loadInitData();
162161
}

src/reducers/mainReducers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export const undo = (state: ApplicationStateInt) => {
193193

194194
export const redo = (state: ApplicationStateInt) => {
195195
//if the future history array is empty, return the current state
196-
if (!state.future) return { ...state };
196+
if (!state.future.length) return state;
197197
const stateCopy = cloneDeep(state);
198198
const futureCopy = cloneDeep(state.future);
199199
//grab the first element of the future history array and assign it to the new state

src/utils/componentRender.util.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,8 @@ const componentRender = (
4141
return 'boolean';
4242
case 'function':
4343
return '() => any';
44-
// case 'symbol':
45-
// return 'string';
46-
case 'node':
47-
return 'string';
48-
case 'element':
49-
return 'string';
5044
case 'tuple':
5145
return '[any]';
52-
case 'enum':
53-
return '{}';
5446
case 'any':
5547
return 'any';
5648
default:
@@ -185,7 +177,7 @@ const componentRender = (
185177
.join('\n')}
186178
187179
188-
180+
/* Replace "any" with stricter types to reflect your usage*/
189181
interface Props {
190182
${props.map(prop => `${prop.key}: ${typeSwitcher(prop.type)};\n`)}
191183
};

0 commit comments

Comments
 (0)