fix: Adding deploy button on git deploy tab (#14597)

This commit is contained in:
f0c1s 2022-06-29 18:03:53 +05:30 committed by GitHub
parent 306b02ec6f
commit a3cd34e9f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -201,7 +201,11 @@ function Deploy() {
}, []);
const commitButtonDisabled = !hasChangesToCommit || !commitMessage;
const commitButtonLoading = isCommittingInProgress;
const commitInputDisabled = !hasChangesToCommit || isCommittingInProgress;
const commitInputDisabled =
!hasChangesToCommit ||
isCommittingInProgress ||
isCommitAndPushSuccessful ||
isDiscarding;
const commitRequired =
!!gitStatus?.modifiedPages ||

View File

@ -193,6 +193,20 @@ function* connectToGitSaga(action: ConnectToGitReduxAction) {
const updatedPath = addBranchParam(branch);
history.replace(updatedPath);
/* commit effect START */
yield put(commitToRepoSuccess());
const curApplication: ApplicationPayload = yield select(
getCurrentApplication,
);
if (curApplication) {
curApplication.lastDeployedAt = new Date().toISOString();
yield put({
type: ReduxActionTypes.FETCH_APPLICATION_SUCCESS,
payload: curApplication,
});
}
/* commit effect END */
}
} catch (error) {
if (action.onErrorCallback) {