diff --git a/frontend/src/lib/components/ModulePreview.svelte b/frontend/src/lib/components/ModulePreview.svelte index 4169fa7edf..452596d984 100644 --- a/frontend/src/lib/components/ModulePreview.svelte +++ b/frontend/src/lib/components/ModulePreview.svelte @@ -4,10 +4,10 @@ import { workspaceStore } from '$lib/stores' import { getScriptByPath } from '$lib/scripts' - import { CornerDownLeft, Loader2 } from 'lucide-svelte' + import { Loader2 } from 'lucide-svelte' import { getContext } from 'svelte' import { Pane, Splitpanes } from 'svelte-splitpanes' - import Button from './common/button/Button.svelte' + import { RunButton } from '$lib/components/common' import DisplayResult from './DisplayResult.svelte' import type { FlowEditorContext } from './flows/types' import LogViewer from './LogViewer.svelte' @@ -102,11 +102,6 @@ } let forceJson = false - - // cancelLoading is true when the job is being cancelled - $: if (cancelLoading && !testIsLoading) { - cancelLoading = false - } - {#if testIsLoading} - - {:else} - - {/if} + runTest(stepArgs)} + on:cancel={() => testJobLoader?.cancelJob()} + {testIsLoading} + bind:cancelLoading + />