Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adhiraj23zelthy committed Dec 13, 2024
1 parent 7083a63 commit 3b7ed52
Showing 1 changed file with 0 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ const UpdateAppDetailsForm = ({ closeModal }) => {
if (!tempValues['fav_icon']) {
delete tempValues['fav_icon'];
}

// Preserve existing git config if not modified
const existingGitConfig = appConfigurationData?.app?.extra_config?.git_config || {};
const extra_config = {
git_config: {
Expand Down Expand Up @@ -100,7 +98,6 @@ const UpdateAppDetailsForm = ({ closeModal }) => {
closeModal();
dispatch(toggleRerenderPage());
} else {
// Restore values in case of error
tempValues.dev = extra_config?.git_config?.branch?.dev;
tempValues.prod = extra_config?.git_config?.branch?.prod;
tempValues.staging = extra_config?.git_config?.branch?.staging;
Expand All @@ -112,59 +109,6 @@ const UpdateAppDetailsForm = ({ closeModal }) => {
makeApiCall();
};

// let onSubmit = (values) => {
// let tempValues = values;
// if (!tempValues['logo']) {
// delete tempValues['logo'];
// }

// if (!tempValues['fav_icon']) {
// delete tempValues['fav_icon'];
// }
// const extra_config = {
// git_config: {
// branch: {
// dev: tempValues.dev==''?null:tempValues.dev,
// prod: tempValues.prod==''?null:tempValues.prod,
// staging: tempValues.staging==''?null:tempValues.staging
// },
// repo_url: tempValues.repo_url==''?null:tempValues.repo_url
// },
// sync_packages: tempValues.sync_packages
// };

// delete tempValues.dev;
// delete tempValues.prod;
// delete tempValues.staging;
// delete tempValues.repo_url;
// delete tempValues.sync_packages;

// tempValues.extra_config = JSON.stringify(extra_config);

// let dynamicFormData = transformToFormData(tempValues);

// const makeApiCall = async () => {
// const { response, success } = await triggerApi({
// url: `/api/v1/apps/${appId}/`,
// type: 'PUT',
// loader: true,
// payload: dynamicFormData,
// });

// if (success && response) {
// closeModal();
// dispatch(toggleRerenderPage());
// }else{
// tempValues.dev = extra_config?.git_config?.branch?.dev;
// tempValues.prod = extra_config?.git_config?.branch?.prod;
// tempValues.staging = extra_config?.git_config?.branch?.staging;
// tempValues.repo_url = extra_config?.git_config?.repo_url;
// tempValues.sync_packages = extra_config?.sync_packages;
// }
// };

// makeApiCall();
// };

return (
<Formik
Expand Down

0 comments on commit 3b7ed52

Please sign in to comment.