Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit28b2bbd

Browse files
refactor: Make navbar and users tab href consistent (#5754)
1 parentc6fb469 commit28b2bbd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎site/src/components/NavbarView/NavbarView.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import { navHeight } from "../../theme/constants"
1313
import{combineClasses}from"../../util/combineClasses"
1414
import{UserDropdown}from"../UserDropdown/UsersDropdown"
1515

16+
exportconstUSERS_LINK=`/users?filter=${encodeURIComponent("status:active")}`
17+
1618
exportinterfaceNavbarViewProps{
1719
logo_url?:string
1820
user?:TypesGen.User
@@ -59,10 +61,7 @@ const NavItems: React.FC<
5961
</NavLink>
6062
</ListItem>
6163
<ListItembuttonclassName={styles.item}>
62-
<NavLink
63-
className={styles.link}
64-
to={`/users?filter=${encodeURIComponent("status:active")}`}
65-
>
64+
<NavLinkclassName={styles.link}to={USERS_LINK}>
6665
{Language.users}
6766
</NavLink>
6867
</ListItem>

‎site/src/components/UsersLayout/UsersLayout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Link from "@material-ui/core/Link"
33
import{makeStyles}from"@material-ui/core/styles"
44
importGroupAddfrom"@material-ui/icons/GroupAddOutlined"
55
importPersonAddfrom"@material-ui/icons/PersonAddOutlined"
6+
import{USERS_LINK}from"components/NavbarView/NavbarView"
67
import{PageHeader,PageHeaderTitle}from"components/PageHeader/PageHeader"
78
import{useFeatureVisibility}from"hooks/useFeatureVisibility"
89
import{usePermissions}from"hooks/usePermissions"
@@ -61,7 +62,7 @@ export const UsersLayout: FC = () => {
6162
<Stackdirection="row"spacing={0.25}>
6263
<NavLink
6364
end
64-
to="/users"
65+
to={USERS_LINK}
6566
className={({ isActive})=>
6667
combineClasses([
6768
styles.tabItem,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp