import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { Link, Redirect, Route, Switch, useHistory, useLocation } from 'react-router-dom'; import LandingGradient from 'soapbox/components/landing-gradient'; import SiteLogo from 'soapbox/components/site-logo'; import { useOwnAccount, useInstance, useRegistrationStatus } from 'soapbox/hooks'; import { Button, Card, CardBody } from '../../components/ui'; import LoginPage from '../auth-login/components/login-page'; import PasswordReset from '../auth-login/components/password-reset'; import PasswordResetConfirm from '../auth-login/components/password-reset-confirm'; import RegistrationForm from '../auth-login/components/registration-form'; import ExternalLoginForm from '../external-login/components/external-login-form'; import Footer from '../public-layout/components/footer'; import RegisterInvite from '../register-invite'; import Verification from '../verification'; import EmailPassthru from '../verification/email-passthru'; const messages = defineMessages({ register: { id: 'auth_layout.register', defaultMessage: 'Create an account' }, }); const AuthLayout = () => { const intl = useIntl(); const history = useHistory(); const { search } = useLocation(); const account = useOwnAccount(); const instance = useInstance(); const { isOpen } = useRegistrationStatus(); const isLoginPage = history.location.pathname === '/login'; return (