mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
refactor: localize tabs at both the org and project level
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
enum TabSections {
|
||||
Member = "members",
|
||||
Roles = "roles",
|
||||
Groups = "groups",
|
||||
Identities = "identities",
|
||||
ServiceTokens = "service-tokens"
|
||||
}
|
||||
|
||||
const isTabSection = (value: any): value is TabSections => {
|
||||
return Object.values(TabSections).includes(value);
|
||||
}
|
||||
|
||||
export { TabSections, isTabSection }
|
||||
11
frontend/src/views/Org/types/TabSections.ts
Normal file
11
frontend/src/views/Org/types/TabSections.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export enum TabSections {
|
||||
Member = "members",
|
||||
Roles = "roles",
|
||||
Groups = "groups",
|
||||
Identities = "identities",
|
||||
ServiceTokens = "service-tokens"
|
||||
}
|
||||
|
||||
export const isTabSection = (value: string): value is TabSections => {
|
||||
return (Object.values(TabSections) as string[]).includes(value);
|
||||
}
|
||||
11
frontend/src/views/Project/types/TabSections.ts
Normal file
11
frontend/src/views/Project/types/TabSections.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export enum TabSections {
|
||||
Member = "members",
|
||||
Roles = "roles",
|
||||
Groups = "groups",
|
||||
Identities = "identities",
|
||||
ServiceTokens = "service-tokens"
|
||||
}
|
||||
|
||||
export const isTabSection = (value: string): value is TabSections => {
|
||||
return (Object.values(TabSections) as string[]).includes(value);
|
||||
}
|
||||
3
frontend/src/views/Project/types/index.ts
Normal file
3
frontend/src/views/Project/types/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { TabSections, isTabSection } from "./TabSections";
|
||||
|
||||
export { TabSections, isTabSection };
|
||||
Reference in New Issue
Block a user