diff --git a/apps/spruce/src/components/Banners/GithubUsernameBanner.tsx b/apps/spruce/src/components/Banners/GithubUsernameBanner.tsx index 0cde046ab..099b6c9dd 100644 --- a/apps/spruce/src/components/Banners/GithubUsernameBanner.tsx +++ b/apps/spruce/src/components/Banners/GithubUsernameBanner.tsx @@ -1,31 +1,19 @@ import { useQuery } from "@apollo/client"; import Banner from "@leafygreen-ui/banner"; -import { matchPath, useLocation } from "react-router-dom"; import { StyledRouterLink } from "components/styles"; -import { - getPreferencesRoute, - PreferencesTabRoutes, - routes, -} from "constants/routes"; +import { getPreferencesRoute, PreferencesTabRoutes } from "constants/routes"; import { UserSettingsQuery } from "gql/generated/types"; import { USER_SETTINGS } from "gql/queries"; export const GithubUsernameBanner = () => { - const { pathname } = useLocation(); - const matchedPath = matchPath(routes.user, pathname); - const isPatchesPage = !!matchedPath; - // USER SETTINGS QUERY - const { data: userSettingsData } = useQuery( - USER_SETTINGS, - { skip: !isPatchesPage }, - ); + const { data: userSettingsData } = useQuery(USER_SETTINGS); const { userSettings } = userSettingsData || {}; const { githubUser } = userSettings || {}; const { lastKnownAs } = githubUser || {}; const hasNoGithubUser = lastKnownAs === ""; - return isPatchesPage && hasNoGithubUser ? ( + return hasNoGithubUser ? ( Please set your GitHub username on the{" "}