close creator when submitted finished

This commit is contained in:
SrGooglo 2023-08-17 19:07:18 +00:00
parent c5d7db1720
commit cd5d3aa9c6

View File

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