refactor: localize tabs at both the org and project level

This commit is contained in:
lemmyMwaura
2024-07-29 19:37:19 +03:00
parent 3f3e41282d
commit 7239158e7f
5 changed files with 25 additions and 13 deletions

View File

@@ -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 }

View 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);
}

View 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);
}

View File

@@ -0,0 +1,3 @@
import { TabSections, isTabSection } from "./TabSections";
export { TabSections, isTabSection };