fix: try making create new thread transition better (#7200)

This commit is contained in:
Rishabh Saxena 2021-09-07 19:05:01 +05:30 committed by GitHub
parent 19e21e10c0
commit 5f6a948acd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,6 @@ function* createUnpublishedCommentThread(
function* createCommentThread(action: ReduxAction<CreateCommentThreadPayload>) {
try {
yield put(removeUnpublishedCommentThreads());
const newCommentThreadPayload = transformUnpublishCommentThreadToCreateNew(
action.payload,
);
@ -77,6 +76,7 @@ function* createCommentThread(action: ReduxAction<CreateCommentThreadPayload>) {
if (isValidResponse) {
yield put(createCommentThreadSuccess(response.data));
yield put(setVisibleThread(response.data.id));
yield put(removeUnpublishedCommentThreads());
}
} catch (error) {
yield put({