import * as React from "react" ; import { branch , compose , lifecycle , pure , renderComponent , setDisplayName } from "recompose" ; import { RegisterVerificationRequest } from "common" ; import { Loading } from "components" ; import { withFormSubmit , WithFormSubmit , withRememberMe , WithRememberMe } from "enhancers" ; import { RegisterVerificationSuccess } from "./RegisterVerificationSuccess" ; /**
 * Lifecycle properties
 */ type LifecycleProps = WithRememberMe & WithFormSubmit < RegisterVerificationRequest > ; /**
 * Branch properties
 */ type BranchProps = WithFormSubmit < RegisterVerificationRequest > ; /**
 * Render component
 */ export const Render = ( ) => < Loading />; return export function enhance ( ) { return compose ( withRememberMe ( ) , withFormSubmit < RegisterVerificationRequest > ( { message : "You have successfully verified your email address. " + "Use your email address and password to sign in to your account" } ) , lifecycle < LifecycleProps , { } > ( { componentDidMount ( ) { const { submit , setRememberMeFailed } = this . props ; setRememberMeFailed ( ) ; return submit ( ) ; } } ) , branch < BranchProps > ( ( { form } ) => form . success || Boolean ( form . err ) , renderComponent ( RegisterVerificationSuccess ) ) , pure , setDisplayName ( "RegisterVerification" ) ) ; } /**
 * Registration verification component
 */ export const RegisterVerification = enhance ( ) ( Render ) ;