Skip to content

Commit

Permalink
refactoring and removing redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
sksDonni committed Nov 16, 2023
1 parent 8467cf9 commit 2dab2ce
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions frontend/src/scenes/cohorts/cohortEditLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ export const cohortEditLogic = kea<cohortEditLogicType>([

forms(({ actions }) => ({
cohort: {
alwaysShowErrors: true,
showErrorsOnTouch: true,
defaults: NEW_COHORT,
errors: ({ id, name, csv, is_static, filters }) => ({
name: !name ? 'Cohort name cannot be empty' : undefined,
Expand Down Expand Up @@ -234,7 +232,6 @@ export const cohortEditLogic = kea<cohortEditLogicType>([
}
},
saveCohort: async ({ cohortParams }, breakpoint) => {
console.log("reached cohort");
let cohort = { ...cohortParams }
const cohortFormData = createCohortFormData(cohort)

Expand All @@ -248,7 +245,6 @@ export const cohortEditLogic = kea<cohortEditLogicType>([
}
} catch (error: any) {
breakpoint()
console.log("failure to save", error);
lemonToast.error(error.detail || 'Failed to save cohort')
return values.cohort
}
Expand Down Expand Up @@ -280,7 +276,6 @@ export const cohortEditLogic = kea<cohortEditLogicType>([
}
return processCohort(cohort)
},

},
],
duplicatedCohort: [
Expand Down Expand Up @@ -324,7 +319,6 @@ export const cohortEditLogic = kea<cohortEditLogicType>([
router.actions.push(urls.cohorts())
},
submitCohort: () => {
console.log("submit cohort", values.cohortHasErrors)
if(values.cohortHasErrors){
lemonToast.error('Cohort error. There was an error submiting this cohort. Make sure the cohort filters are correct.')
}
Expand Down

0 comments on commit 2dab2ce

Please sign in to comment.