@@ -134,8 +134,8 @@ export class Component extends MobxLitElement {
134134 }
135135
136136 private renderHeader ( ) {
137- const getCohortName = ( length : number ) => {
138- return this . experimentManager . getNextCohortName ( length ) ;
137+ const getCohortName = ( offset : number ) => {
138+ return this . experimentManager . getNextCohortName ( offset ) ;
139139 } ;
140140
141141 return html `
@@ -155,9 +155,7 @@ export class Component extends MobxLitElement {
155155 ?loading =${ this . experimentManager . isWritingCohort }
156156 @click =${ ( ) => {
157157 this . analyticsService . trackButtonClick ( ButtonClick . COHORT_ADD ) ;
158- const name = getCohortName (
159- this . experimentManager . cohortList . length ,
160- ) ;
158+ const name = getCohortName ( 0 ) ;
161159 this . experimentManager . createCohort ( { } , name ) ;
162160 } }
163161 >
@@ -170,12 +168,11 @@ export class Component extends MobxLitElement {
170168 variant ="tonal "
171169 ?loading =${ this . experimentManager . isWritingCohort }
172170 @click =${ ( ) => {
173- const numCohorts = this . experimentManager . cohortList . length ;
174171 [ ...Array ( 5 ) . keys ( ) ] . forEach ( ( key ) => {
175172 this . analyticsService . trackButtonClick (
176173 ButtonClick . COHORT_ADD ,
177174 ) ;
178- const name = getCohortName ( numCohorts + key ) ;
175+ const name = getCohortName ( key ) ;
179176 this . experimentManager . createCohort ( { } , name ) ;
180177 } ) ;
181178 } }
@@ -189,12 +186,11 @@ export class Component extends MobxLitElement {
189186 variant ="tonal "
190187 ?loading =${ this . experimentManager . isWritingCohort }
191188 @click =${ ( ) => {
192- const numCohorts = this . experimentManager . cohortList . length ;
193189 [ ...Array ( 10 ) . keys ( ) ] . forEach ( ( key ) => {
194190 this . analyticsService . trackButtonClick (
195191 ButtonClick . COHORT_ADD ,
196192 ) ;
197- const name = getCohortName ( numCohorts + key ) ;
193+ const name = getCohortName ( key ) ;
198194 this . experimentManager . createCohort ( { } , name ) ;
199195 } ) ;
200196 } }
0 commit comments