mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +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 ====================
|
||||
return (
|
||||
<div className="flex h-full flex-col">
|
||||
@@ -121,7 +126,7 @@ export default function PipelineDetailContent({ id }: { id: string }) {
|
||||
showButtons={false}
|
||||
onFinish={handleFinish}
|
||||
onNewPipelineCreated={handleNewPipelineCreated}
|
||||
onDeletePipeline={() => {}}
|
||||
onDeletePipeline={handleDeletePipeline}
|
||||
onCancel={() => router.push('/home/pipelines')}
|
||||
onDirtyChange={setFormDirty}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user