fix: remove unused pages from Admin dropdown (org and settings) (#1788)

* Delete Orgs Page

* Delete Admin Settings page
This commit is contained in:
Presley Pizzo
2022-05-26 13:10:54 -04:00
committed by GitHub
parent 8f0a5a81f1
commit fc67c6efb1
5 changed files with 0 additions and 66 deletions
-18
View File
@@ -8,8 +8,6 @@ import { NotFoundPage } from "./pages/404Page/404Page"
import { CliAuthenticationPage } from "./pages/CliAuthPage/CliAuthPage"
import { HealthzPage } from "./pages/HealthzPage/HealthzPage"
import { LoginPage } from "./pages/LoginPage/LoginPage"
import { OrgsPage } from "./pages/OrgsPage/OrgsPage"
import { SettingsPage } from "./pages/SettingsPage/SettingsPage"
import { AccountPage } from "./pages/SettingsPages/AccountPage/AccountPage"
import { SSHKeysPage } from "./pages/SettingsPages/SSHKeysPage/SSHKeysPage"
import { TemplatePage } from "./pages/TemplatePage/TemplatePage"
@@ -134,22 +132,6 @@ export const AppRouter: React.FC = () => (
}
/>
</Route>
<Route
path="orgs"
element={
<AuthAndFrame>
<OrgsPage />
</AuthAndFrame>
}
/>
<Route
path="settings"
element={
<AuthAndFrame>
<SettingsPage />
</AuthAndFrame>
}
/>
<Route path="settings" element={<SettingsLayout />}>
<Route path="account" element={<AccountPage />} />
@@ -14,8 +14,6 @@ describe("AdminDropdown", () => {
it("opens the menu", async () => {
await renderAndClick()
expect(screen.getByText(Language.usersLabel)).toBeDefined()
expect(screen.getByText(Language.orgsLabel)).toBeDefined()
expect(screen.getByText(Language.settingsLabel)).toBeDefined()
})
})
@@ -27,22 +25,4 @@ describe("AdminDropdown", () => {
expect(history.location.pathname).toEqual("/users")
})
it("links to the orgs page", async () => {
await renderAndClick()
const usersLink = screen.getByText(Language.orgsLabel).closest("a")
usersLink?.click()
expect(history.location.pathname).toEqual("/orgs")
})
it("links to the settings page", async () => {
await renderAndClick()
const usersLink = screen.getByText(Language.settingsLabel).closest("a")
usersLink?.click()
expect(history.location.pathname).toEqual("/settings")
})
})
@@ -1,23 +1,17 @@
import ListItem from "@material-ui/core/ListItem"
import ListItemText from "@material-ui/core/ListItemText"
import { fade, makeStyles, Theme } from "@material-ui/core/styles"
import AdminIcon from "@material-ui/icons/SettingsOutlined"
import React, { useState } from "react"
import { navHeight } from "../../theme/constants"
import { BorderedMenu } from "../BorderedMenu/BorderedMenu"
import { BorderedMenuRow } from "../BorderedMenuRow/BorderedMenuRow"
import { CloseDropdown, OpenDropdown } from "../DropdownArrows/DropdownArrows"
import { BuildingIcon } from "../Icons/BuildingIcon"
import { UsersOutlinedIcon } from "../Icons/UsersOutlinedIcon"
export const Language = {
menuTitle: "Admin",
usersLabel: "Users",
usersDescription: "Manage users, roles, and permissions.",
orgsLabel: "Organizations",
orgsDescription: "Manage organizations.",
settingsLabel: "Settings",
settingsDescription: "Configure authentication and more.",
}
const entries = [
@@ -27,18 +21,6 @@ const entries = [
path: "/users",
Icon: UsersOutlinedIcon,
},
{
label: Language.orgsLabel,
description: Language.orgsDescription,
path: "/orgs",
Icon: BuildingIcon,
},
{
label: Language.settingsLabel,
description: Language.settingsDescription,
path: "/settings",
Icon: AdminIcon,
},
]
export const AdminDropdown: React.FC = () => {
-5
View File
@@ -1,5 +0,0 @@
import React from "react"
export const OrgsPage: React.FC = () => {
return <div>Coming soon!</div>
}
@@ -1,5 +0,0 @@
import React from "react"
export const SettingsPage: React.FC = () => {
return <div>Coming soon!</div>
}