diff --git a/frontend/src/types/TabSections.ts b/frontend/src/types/TabSections.ts deleted file mode 100644 index ef49919bc..000000000 --- a/frontend/src/types/TabSections.ts +++ /dev/null @@ -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 } diff --git a/frontend/src/views/Org/types/TabSections.ts b/frontend/src/views/Org/types/TabSections.ts new file mode 100644 index 000000000..ffc93587e --- /dev/null +++ b/frontend/src/views/Org/types/TabSections.ts @@ -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); +} diff --git a/frontend/src/types/index.ts b/frontend/src/views/Org/types/index.ts similarity index 100% rename from frontend/src/types/index.ts rename to frontend/src/views/Org/types/index.ts diff --git a/frontend/src/views/Project/types/TabSections.ts b/frontend/src/views/Project/types/TabSections.ts new file mode 100644 index 000000000..ffc93587e --- /dev/null +++ b/frontend/src/views/Project/types/TabSections.ts @@ -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); +} diff --git a/frontend/src/views/Project/types/index.ts b/frontend/src/views/Project/types/index.ts new file mode 100644 index 000000000..76f47c6f2 --- /dev/null +++ b/frontend/src/views/Project/types/index.ts @@ -0,0 +1,3 @@ +import { TabSections, isTabSection } from "./TabSections"; + +export { TabSections, isTabSection };