From 2d5870cdb8265da879eef1bbdd33bbd98bb3bf2c Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Tue, 3 Jan 2023 22:04:29 +0000 Subject: [PATCH 1/3] refactor: move footer items into the user dropdown The items at the bottom looked unprofessional. Users don't always need to be prompted to join our Discord or see the active version of Coder. This moves the items in the user dropdown which looks better. --- .../components/AuthAndFrame/AuthAndFrame.tsx | 3 - .../DeploySettingsLayout/Badges.tsx | 22 +++++ site/src/components/Footer/Footer.stories.tsx | 17 ---- site/src/components/Footer/Footer.test.tsx | 22 ----- site/src/components/Footer/Footer.tsx | 98 ------------------- site/src/components/Navbar/Navbar.tsx | 2 + site/src/components/NavbarView/NavbarView.tsx | 10 +- .../components/SignInLayout/SignInLayout.tsx | 3 +- .../components/UserDropdown/UsersDropdown.tsx | 4 +- .../UserDropdownContent.test.tsx | 7 +- .../UserDropdownContent.tsx | 83 ++++++++++++++-- .../GeneralSettingsPage.tsx | 2 - 12 files changed, 120 insertions(+), 153 deletions(-) delete mode 100644 site/src/components/Footer/Footer.stories.tsx delete mode 100644 site/src/components/Footer/Footer.test.tsx delete mode 100644 site/src/components/Footer/Footer.tsx diff --git a/site/src/components/AuthAndFrame/AuthAndFrame.tsx b/site/src/components/AuthAndFrame/AuthAndFrame.tsx index e0256915aa9ee..c3a5a5ecc7553 100644 --- a/site/src/components/AuthAndFrame/AuthAndFrame.tsx +++ b/site/src/components/AuthAndFrame/AuthAndFrame.tsx @@ -3,7 +3,6 @@ import { useActor } from "@xstate/react" import { Loader } from "components/Loader/Loader" import { FC, Suspense, useContext, useEffect } from "react" import { XServiceContext } from "../../xServices/StateContext" -import { Footer } from "../Footer/Footer" import { Navbar } from "../Navbar/Navbar" import { RequireAuth } from "../RequireAuth/RequireAuth" import { UpdateCheckBanner } from "components/UpdateCheckBanner/UpdateCheckBanner" @@ -20,7 +19,6 @@ export const AuthAndFrame: FC = ({ children }) => { const styles = useStyles() const xServices = useContext(XServiceContext) const [authState] = useActor(xServices.authXService) - const [buildInfoState] = useActor(xServices.buildInfoXService) const [updateCheckState, updateCheckSend] = useActor( xServices.updateCheckXService, ) @@ -51,7 +49,6 @@ export const AuthAndFrame: FC = ({ children }) => {
}>{children}
-