close creator when submitted finished

This commit is contained in:
SrGooglo 2023-08-17 19:07:18 +00:00
parent d2f669b29b
commit 5deec49e64

View File

@ -18,6 +18,8 @@ const DEFAULT_POST_POLICY = {
maximunFilesPerRequest: 10 maximunFilesPerRequest: 10
} }
// TODO: Fix close window when post created
export default class PostCreator extends React.Component { export default class PostCreator extends React.Component {
state = { state = {
pending: [], pending: [],
@ -110,6 +112,10 @@ export default class PostCreator extends React.Component {
if (typeof this.props.onPost === "function") { if (typeof this.props.onPost === "function") {
this.props.onPost() this.props.onPost()
} }
if (typeof this.props.close === "function") {
this.props.close()
}
} }
} }