diff --git a/ui/src/components/sidebar.tsx b/ui/src/components/sidebar.tsx index c9162f4..9a78a1d 100644 --- a/ui/src/components/sidebar.tsx +++ b/ui/src/components/sidebar.tsx @@ -29,7 +29,6 @@ export function Sidebar() { const navigate = useNavigate(); const { pipelineId } = useParams(); const [open, setOpen] = useState(false); - const [value, setValue] = useState(pipelineId); const { data: pipelinesData, isLoading } = useListPipelinesQuery(); return ( @@ -58,9 +57,9 @@ export function Sidebar() { > {isLoading ? 'Loading pipelines...' - : value + : pipelineId ? pipelinesData?.pipelines?.find( - (pipeline: Pipeline) => pipeline.name === value + (pipeline: Pipeline) => pipeline.name === pipelineId )?.name : 'Select pipeline...'} @@ -79,7 +78,6 @@ export function Sidebar() { key={pipeline.name} value={pipeline.name} onSelect={(currentValue: string) => { - setValue(currentValue === value ? '' : currentValue); setOpen(false); navigate(`/pipelines/${currentValue}`); }} @@ -88,7 +86,7 @@ export function Sidebar() { {pipeline.name}