Fix import export for environments
This commit is contained in:
@@ -43,6 +43,14 @@ const dispatchers = defineDispatchers({
|
||||
currentEnvironmentIndex: newIndex,
|
||||
}
|
||||
},
|
||||
appendEnvironments(
|
||||
{ environments }: EnvironmentStore,
|
||||
{ envs }: { envs: Environment[] }
|
||||
) {
|
||||
return {
|
||||
environments: [...environments, ...envs],
|
||||
}
|
||||
},
|
||||
replaceEnvironments(
|
||||
_: EnvironmentStore,
|
||||
{ environments }: { environments: Environment[] }
|
||||
@@ -235,6 +243,15 @@ export function replaceEnvironments(newEnvironments: any[]) {
|
||||
})
|
||||
}
|
||||
|
||||
export function appendEnvironments(envs: Environment[]) {
|
||||
environmentsStore.dispatch({
|
||||
dispatcher: "appendEnvironments",
|
||||
payload: {
|
||||
envs,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export function createEnvironment(envName: string) {
|
||||
environmentsStore.dispatch({
|
||||
dispatcher: "createEnvironment",
|
||||
|
||||
Reference in New Issue
Block a user