// External imports import * as React from "react" import { Route } from "react-router-dom" // Internal imports import * as ce from "../../helpers/componentEnhancer" import LoginForm from "./loginForm" import RegistrationForm from "./registrationForm" import ForgotPasswordForm from "./forgotPasswordForm" import ResetPasswordWithTokenForm from "./resetPasswordWithTokenForm" import LogInWithTokenPage from "./logInWithTokenPage" import * as userActions from "../../actions/user" import LoadingIndicator from "../reusable/loadingIndicator" export interface ParentProps {} interface StateProps {} interface DispatchProps { logInWithAppleIdentifier: () => void } class Public extends React.Component< ParentProps & StateProps & DispatchProps & ce.EnhancedPropsPrivate > { componentDidMount() { if (this.props.module.autoLoginWithAppleIdentifier) this.props.logInWithAppleIdentifier() } render() { return ( {this.props.module.autoLoginWithAppleIdentifier ? ( ) : ( <> } /> } /> } /> ( )} /> } />{" "} > )} ) } } const stateMappings: ce.StateMappings = (s, props) => ({}) const dispatchMappings: ce.DispatchMappings = (d, props) => ({ logInWithAppleIdentifier: () => d(userActions.logInWithAppleIdentifier(props.module.api, props.history)) }) export default ((): React.ComponentType => ce.enhance(Public, { stateMappings, dispatchMappings }))()