Skip to content

Commit

Permalink
fixed a bug in the stack selector sidebar, now the list items stay pr…
Browse files Browse the repository at this point in the history
…operly selected/deselected
  • Loading branch information
phitoduck committed Oct 5, 2024
1 parent f9b6860 commit 3dd20c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def pulumi_program():
destroy = True

project_name = "lambda-rest-api"
stack_name = "dev-2"
stack_name = "another"

# create or select a stack matching the specified name and project.
# this will set up a workspace with everything necessary to run our inline program
Expand Down
3 changes: 2 additions & 1 deletion pulumi-ui-frontend/src/components/StackExplorerBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ const StackExplorerBar: React.FC<StackExplorerBarProps> = ({
};

const isStackSelected = (projectName: string, stackName: string) => {
return location.pathname.includes(`/projects/${projectName}/stacks/${stackName}`);
const pathParts = location.pathname.split('/');
return pathParts[2] === projectName && pathParts[4] === stackName;
};

return (
Expand Down

0 comments on commit 3dd20c1

Please sign in to comment.