diff --git a/app/soapbox/features/auth-layout/index.tsx b/app/soapbox/features/auth-layout/index.tsx index 629bb3c9b..b792bc006 100644 --- a/app/soapbox/features/auth-layout/index.tsx +++ b/app/soapbox/features/auth-layout/index.tsx @@ -4,7 +4,7 @@ import { Link, Redirect, Route, Switch, useHistory, useLocation } from 'react-ro import LandingGradient from 'soapbox/components/landing-gradient'; import SiteLogo from 'soapbox/components/site-logo'; -import { useAppSelector, useFeatures, useSoapboxConfig, useOwnAccount, useInstance } from 'soapbox/hooks'; +import { useOwnAccount, useInstance, useRegistrationStatus } from 'soapbox/hooks'; import { Button, Card, CardBody } from '../../components/ui'; import LoginPage from '../auth-login/components/login-page'; @@ -28,14 +28,8 @@ const AuthLayout = () => { const account = useOwnAccount(); const instance = useInstance(); - const features = useFeatures(); - const soapboxConfig = useSoapboxConfig(); - - const pepeEnabled = soapboxConfig.getIn(['extensions', 'pepe', 'enabled']) === true; - const isOpen = features.accountCreation && instance.registrations; - const pepeOpen = useAppSelector(state => state.verification.instance.get('registrations') === true); + const { isOpen } = useRegistrationStatus(); const isLoginPage = history.location.pathname === '/login'; - const shouldShowRegisterLink = (isLoginPage && (isOpen || (pepeEnabled && pepeOpen))); return (