import React from "react"; import { Route, Switch, useLocation, useRouteMatch } from "react-router-dom"; import Login from "pages/UserAuth/Login"; import SignUp from "pages/UserAuth/SignUp"; import ForgotPassword from "./ForgotPassword"; import ResetPassword from "./ResetPassword"; import PageNotFound from "pages/common/ErrorPages/PageNotFound"; import * as Sentry from "@sentry/react"; import { requiresUnauth } from "./requiresAuthHOC"; import { useSelector } from "react-redux"; import { getThemeDetails, ThemeMode } from "selectors/themeSelectors"; import type { AppState } from "ee/reducers"; import { ThemeProvider } from "styled-components"; import VerificationPending from "./VerificationPending"; import VerifyUser from "./VerifyUser"; import VerificationError from "./VerificationError"; import FooterLinks from "./FooterLinks"; import { useIsMobileDevice } from "utils/hooks/useDeviceDetect"; import { getAssetUrl } from "ee/utils/airgapHelpers"; import { getTenantConfig } from "ee/selectors/tenantSelectors"; import { getAppsmithConfigs } from "ee/configs"; const SentryRoute = Sentry.withSentryRouting(Route); export function UserAuth() { const { path } = useRouteMatch(); const location = useLocation(); const lightTheme = useSelector((state: AppState) => getThemeDetails(state, ThemeMode.LIGHT), ); const isMobileDevice = useIsMobileDevice(); const tenantConfig = useSelector(getTenantConfig); const { cloudHosting } = getAppsmithConfigs(); return ( {/* TODO: (Albin) - chnages this to ads-v2 variable once branding is sorted out. */}
{isMobileDevice && ( )} {cloudHosting && }
); } export default requiresUnauth(UserAuth);