mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-10 21:10:59 +00:00
fix(web): refresh sidebar and navigate away after pipeline deletion
The onDeletePipeline callback was a no-op, causing the sidebar to remain stale and the content area to stay on the deleted pipeline. Now calls refreshPipelines() and navigates to /home/pipelines, consistent with bot and knowledge base deletion behavior.
This commit is contained in:
@@ -71,6 +71,11 @@ export default function PipelineDetailContent({ id }: { id: string }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleDeletePipeline() {
|
||||||
|
refreshPipelines();
|
||||||
|
router.push('/home/pipelines');
|
||||||
|
}
|
||||||
|
|
||||||
// ==================== Edit Mode ====================
|
// ==================== Edit Mode ====================
|
||||||
return (
|
return (
|
||||||
<div className="flex h-full flex-col">
|
<div className="flex h-full flex-col">
|
||||||
@@ -121,7 +126,7 @@ export default function PipelineDetailContent({ id }: { id: string }) {
|
|||||||
showButtons={false}
|
showButtons={false}
|
||||||
onFinish={handleFinish}
|
onFinish={handleFinish}
|
||||||
onNewPipelineCreated={handleNewPipelineCreated}
|
onNewPipelineCreated={handleNewPipelineCreated}
|
||||||
onDeletePipeline={() => {}}
|
onDeletePipeline={handleDeletePipeline}
|
||||||
onCancel={() => router.push('/home/pipelines')}
|
onCancel={() => router.push('/home/pipelines')}
|
||||||
onDirtyChange={setFormDirty}
|
onDirtyChange={setFormDirty}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user