Skip to content

Commit

Permalink
Fix ordering of saved configs
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Apr 8, 2024
1 parent a7fa98d commit 0e86131
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions web/src/core/usecases/restorableConfigManagement/thunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { Thunks } from "core/bootstrap";
import * as projectManagement from "core/usecases/projectManagement";
import { Chart } from "core/ports/OnyxiaApi";
import { actions, type State } from "./state";
import { readFriendlyName, protectedSelectors } from "./selectors";
import { readFriendlyName } from "./selectors";

export const protectedThunks = {
"initialize":
Expand Down Expand Up @@ -51,7 +51,8 @@ export const protectedThunks = {

const { restorableConfig } = params;

const restorableConfigs = protectedSelectors.restorableConfigs(getState());
const { restorableConfigs } =
projectManagement.protectedSelectors.currentProjectConfigs(getState());

return (
restorableConfigs.find(restorableConfig_i =>
Expand All @@ -71,7 +72,8 @@ export const thunks = {

const { restorableConfig } = params;

const restorableConfigs = protectedSelectors.restorableConfigs(getState());
const { restorableConfigs } =
projectManagement.protectedSelectors.currentProjectConfigs(getState());

const restorableConfigWithSameFriendlyNameAndSameService = (() => {
const results = restorableConfigs.filter(
Expand Down Expand Up @@ -128,7 +130,8 @@ export const thunks = {

const { restorableConfig } = params;

const restorableConfigs = protectedSelectors.restorableConfigs(getState());
const { restorableConfigs } =
projectManagement.protectedSelectors.currentProjectConfigs(getState());

const indexOfRestorableConfigToDelete = restorableConfigs.findIndex(
restorableConfig_i =>
Expand Down

0 comments on commit 0e86131

Please sign in to comment.