From 85360146de9366e07eb3a0d19b0109147d3b586d Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Tue, 17 Jan 2023 17:56:46 +0000 Subject: [PATCH] refactor: Make navbar and users tab href consistent --- site/src/components/NavbarView/NavbarView.tsx | 7 +++---- site/src/components/UsersLayout/UsersLayout.tsx | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/site/src/components/NavbarView/NavbarView.tsx b/site/src/components/NavbarView/NavbarView.tsx index fbbf81e9d184a..8e67fac50644c 100644 --- a/site/src/components/NavbarView/NavbarView.tsx +++ b/site/src/components/NavbarView/NavbarView.tsx @@ -13,6 +13,8 @@ import { navHeight } from "../../theme/constants" import { combineClasses } from "../../util/combineClasses" import { UserDropdown } from "../UserDropdown/UsersDropdown" +export const USERS_LINK = `/users?filter=${encodeURIComponent("status:active")}` + export interface NavbarViewProps { logo_url?: string user?: TypesGen.User @@ -59,10 +61,7 @@ const NavItems: React.FC< - + {Language.users} diff --git a/site/src/components/UsersLayout/UsersLayout.tsx b/site/src/components/UsersLayout/UsersLayout.tsx index 33218b4d6e836..e57f24f84159c 100644 --- a/site/src/components/UsersLayout/UsersLayout.tsx +++ b/site/src/components/UsersLayout/UsersLayout.tsx @@ -3,6 +3,7 @@ import Link from "@material-ui/core/Link" import { makeStyles } from "@material-ui/core/styles" import GroupAdd from "@material-ui/icons/GroupAddOutlined" import PersonAdd from "@material-ui/icons/PersonAddOutlined" +import { USERS_LINK } from "components/NavbarView/NavbarView" import { PageHeader, PageHeaderTitle } from "components/PageHeader/PageHeader" import { useFeatureVisibility } from "hooks/useFeatureVisibility" import { usePermissions } from "hooks/usePermissions" @@ -61,7 +62,7 @@ export const UsersLayout: FC = () => { combineClasses([ styles.tabItem,