diff --git a/webapp/src/components/Navbar/Navbar.container.ts b/webapp/src/components/Navbar/Navbar.container.ts index 6235336de..8c0e8a34c 100644 --- a/webapp/src/components/Navbar/Navbar.container.ts +++ b/webapp/src/components/Navbar/Navbar.container.ts @@ -4,9 +4,6 @@ import { isPending } from 'decentraland-dapps/dist/modules/transaction/utils' import { RootState } from '../../modules/reducer' import { getTransactions } from '../../modules/transaction/selectors' -import { - getIsAuthDappEnabled, -} from '../../modules/features/selectors' import { MapStateProps, MapDispatch, MapDispatchProps } from './Navbar.types' import Navbar from './Navbar' import { getCurrentIdentity } from '../../modules/identity/selectors' @@ -17,8 +14,7 @@ const mapState = (state: RootState): MapStateProps => ({ hasPendingTransactions: getTransactions(state).some((tx: { status: TransactionStatus | null }) => isPending(tx.status) ), - identity: getCurrentIdentity(state) || undefined, - isAuthDappEnabled: getIsAuthDappEnabled(state), + identity: getCurrentIdentity(state) || undefined }) const mapDispatch = (dispatch: MapDispatch): MapDispatchProps => ({ diff --git a/webapp/src/components/Navbar/Navbar.tsx b/webapp/src/components/Navbar/Navbar.tsx index 573626365..47c8707b6 100644 --- a/webapp/src/components/Navbar/Navbar.tsx +++ b/webapp/src/components/Navbar/Navbar.tsx @@ -7,7 +7,7 @@ import { Props } from './Navbar.types' import './Navbar.css' const Navbar = (props: Props) => { - const { location, onNavigate, isAuthDappEnabled } = props + const { location, onNavigate } = props const { pathname, search } = location const handleOnSignIn = useCallback(() => { @@ -21,14 +21,11 @@ const Navbar = (props: Props) => { const redirectTo = !currentRedirectTo ? `${basename}${pathname}${search}` : `${basename}${currentRedirectTo}` - if (isAuthDappEnabled) { - window.location.replace( - `${config.get('AUTH_URL')}/login?redirectTo=${redirectTo}` - ) - } else { - onNavigate(locations.signIn(redirectTo)) - } - }, [onNavigate, pathname, search, isAuthDappEnabled]) + + window.location.replace( + `${config.get('AUTH_URL')}/login?redirectTo=${redirectTo}` + ) + }, [pathname, search]) const handleOnClickAccount = useCallback(() => { onNavigate(locations.settings()) diff --git a/webapp/src/components/Navbar/Navbar.types.ts b/webapp/src/components/Navbar/Navbar.types.ts index 9808ce99f..c07092f3a 100644 --- a/webapp/src/components/Navbar/Navbar.types.ts +++ b/webapp/src/components/Navbar/Navbar.types.ts @@ -9,17 +9,13 @@ export type Props = Partial & { enablePartialSupportAlert?: boolean onNavigate: (path: string) => void identity?: AuthIdentity - isAuthDappEnabled: boolean } export type OwnProps = Pick export type MapStateProps = Pick< Props, - | 'location' - | 'hasPendingTransactions' - | 'identity' - | 'isAuthDappEnabled' + 'location' | 'hasPendingTransactions' | 'identity' > export type MapDispatchProps = Pick export type MapDispatch = Dispatch diff --git a/webapp/src/components/SignInPage/SignInPage.container.ts b/webapp/src/components/SignInPage/SignInPage.container.ts index 79a5d1bc2..ec86baf6b 100644 --- a/webapp/src/components/SignInPage/SignInPage.container.ts +++ b/webapp/src/components/SignInPage/SignInPage.container.ts @@ -4,13 +4,11 @@ import { isConnected } from 'decentraland-dapps/dist/modules/wallet/selectors' import { RootState } from '../../modules/reducer' -import { getIsAuthDappEnabled } from '../../modules/features/selectors' import { MapStateProps } from './SignInPage.types' import SignInPage from './SignInPage' const mapState = (state: RootState): MapStateProps => { return { - isAuthDappEnabled: getIsAuthDappEnabled(state), isConnecting: isConnecting(state), isConnected: isConnected(state) } diff --git a/webapp/src/components/SignInPage/SignInPage.tsx b/webapp/src/components/SignInPage/SignInPage.tsx index b6c0e942e..d845936e5 100644 --- a/webapp/src/components/SignInPage/SignInPage.tsx +++ b/webapp/src/components/SignInPage/SignInPage.tsx @@ -8,7 +8,8 @@ import { Props } from './SignInPage.types' import './SignInPage.css' const SignInPage = (props: Props) => { - const { isAuthDappEnabled, isConnecting, isConnected } = props + const { isConnecting, isConnected } = props + const handleConnect = useCallback(() => { if (!isConnected && !isConnecting) { const params = new URLSearchParams(window.location.search) @@ -29,7 +30,7 @@ const SignInPage = (props: Props) => { <> - +