Skip to content

Commit c79311e

Browse files
committed
URL for image upload working
1 parent a00acf4 commit c79311e

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/containers/AppContainer.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ class AppContainer extends Component<Props, State> {
8585
};
8686
};
8787

88+
clearImage = () => {
89+
const { changeImagePath } = this.props;
90+
changeImagePath('');
91+
this.setState({
92+
image: null
93+
})
94+
}
95+
8896
componentDidMount() {
8997
this.props.loadInitData();
9098
}

src/reducers/componentReducer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const componentReducer = (state = initialApplicationState, action: any) => {
129129
return changeComponentFocusChild(state, action.payload);
130130
case CHANGE_IMAGE_SOURCE:
131131
return changeImageSource(state, action.payload);
132-
case CREATE_APPLICATION:
132+
// case CREATE_APPLICATION:
133133
case EXPORT_FILES:
134134
return { ...state, loading: true };
135135
case EXPORT_FILES_SUCCESS:

src/utils/componentReducer.util.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ export const handleTransform = (
309309
focusChild: newFocusChild,
310310
};
311311
};
312-
export const changeImageSource = (state: ApplicationStateInt, { src }: { src: string }) => {
312+
313+
export const changeImageSource = (state: ApplicationStateInt, src :string) => {
313314
return {
314315
...state,
315316
imageSource: src

0 commit comments

Comments
 (0)