Skip to content

Commit

Permalink
Removes non-existent config property usage
Browse files Browse the repository at this point in the history
Eliminates references to a non-existent config property *stored_workflow_menu_entries*  in useWorkflowActions to prevent errors and clean up the code. Client does not have access to this property anymore and is not used anywhere
  • Loading branch information
itisAliRH committed Nov 15, 2024
1 parent bb10dac commit 1a7327d
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions client/src/components/Workflow/List/useWorkflowActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
deleteWorkflow as deleteWorkflowService,
updateWorkflow as updateWorkflowService,
} from "@/components/Workflow/workflows.services";
import { useConfig } from "@/composables/config";
import { useConfirmDialog } from "@/composables/confirmDialog";
import { useToast } from "@/composables/toast";
import { copy } from "@/utils/clipboard";
Expand All @@ -17,7 +16,6 @@ type Workflow = any;

export function useWorkflowActions(workflow: Ref<Workflow>, refreshCallback: () => void) {
const toast = useToast();
const { config } = useConfig() as { config: Record<string, any> };

const bookmarkLoading = ref(false);

Expand All @@ -30,18 +28,6 @@ export function useWorkflowActions(workflow: Ref<Workflow>, refreshCallback: ()
});

toast.info(`Workflow ${checked ? "added to" : "removed from"} bookmarks`);

if (checked) {
config.stored_workflow_menu_entries.push({
id: workflow.value.id,
name: workflow.value.name,
});
} else {
const indexToRemove = config.stored_workflow_menu_entries.findIndex(
(w: Workflow) => w.id === workflow.value.id
);
config.stored_workflow_menu_entries.splice(indexToRemove, 1);
}
} catch (error) {
toast.error("Failed to update workflow bookmark status");
} finally {
Expand Down

0 comments on commit 1a7327d

Please sign in to comment.