mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 12:27:28 +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 }
|
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import { TabSections, isTabSection } from "./TabSections";
|
||||||
|
|
||||||
|
export { TabSections, isTabSection };
|
||||||
Reference in New Issue
Block a user