Skip to content

chore: simplify workspace routing #17981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 27, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Improve Regex
  • Loading branch information
BrunoQuaresma authored May 24, 2025
commit 5eb2302137b513f63ba980eb7754b8b74084cbd3
10 changes: 7 additions & 3 deletions site/src/modules/dashboard/DeploymentBanner/DeploymentBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ import { useLocation } from "react-router-dom";
import { DeploymentBannerView } from "./DeploymentBannerView";

const HIDE_DEPLOYMENT_BANNER_PATHS = [
// Workspace page.
// Hide the banner on workspace page because it already has a lot of information.
/^\/@[^\/]+\/[^\/]+$/,
// Hide the banner on workspace page because it already has a lot of
// information.
// - It adds names to the main groups that we're checking for, so it'll be a
// little more self-documenting
// - It redefines each group to only allow the characters A-Z (lowercase or
// uppercase), numbers, and hyphens
/^\/@(?<username>[a-zA-Z0-9-]+)\/(?<workspace_name>[a-zA-Z0-9-]+)$/,
];

export const DeploymentBanner: FC = () => {
Expand Down
Loading