diff --git a/packages/hoppscotch-app/newstore/environments.ts b/packages/hoppscotch-app/newstore/environments.ts index 8017a7225..02f12f30d 100644 --- a/packages/hoppscotch-app/newstore/environments.ts +++ b/packages/hoppscotch-app/newstore/environments.ts @@ -87,12 +87,14 @@ const dispatchers = defineDispatchers({ environments, } } + const index = + environments.filter((env) => env.name === newEnvironment.name).length + 1 return { environments: [ ...environments, { ...cloneDeep(newEnvironment), - name: `Duplicate of ${newEnvironment.name}`, + name: `${newEnvironment.name} ${index}`, }, ], }