@@ -5,6 +5,7 @@ import TextField from "../../Fields/TextField";
55import ButtonInput from "../../Inputs/ButtonInput" ;
66import request from "../../../api/requests/request" ;
77import SelectField from "../../Fields/SelectField" ;
8+ import { ReactComponent as Logo } from "../../../../../assets/img/logo.svg" ;
89
910// API IMPORTS
1011import Error from "../../Errors/Error" ;
@@ -83,8 +84,17 @@ const FormTwoFa = ({authSessionId, companyLogin, userLogin, domain, twoFaProvide
8384 }
8485 } ;
8586
87+ const isEmailProvider = ( selectedProvider === "email" ) ;
88+ const twoFaTitle = isEmailProvider ? __ ( "Email verification" , "simplybook" ) : __ ( "2FA authentication" , "simplybook" ) ;
89+ const twoFaSubtitle = isEmailProvider ? __ ( "Fill in the code sent in the email" , "simplybook" ) : __ ( "Please use your 2FA provider to sign in." , "simplybook" ) ;
90+
8691 return (
8792 < >
93+ < div className = "flex flex-col items-center mb-8" >
94+ < Logo className = "mx-4 w-65 py-2 my-4" />
95+ < h2 className = "my-4" > { twoFaTitle } </ h2 >
96+ < small > { twoFaSubtitle } </ small >
97+ </ div >
8898 < form className = "flex flex-col" onSubmit = { handle2faSubmit } >
8999 { Object . keys ( twoFaProviders ) . length > 1 ? (
90100 < Controller
@@ -97,7 +107,7 @@ const FormTwoFa = ({authSessionId, companyLogin, userLogin, domain, twoFaProvide
97107 fieldState = { fieldState }
98108 label = { __ ( "Select 2FA provider" , "simplybook" ) }
99109 setting = "two_fa_type"
100- options = { selectedProvider }
110+ options = { twoFaProviders }
101111 value = { selectedProvider }
102112 onChange = { ( e ) => {
103113 setSelectedProvider ( e . target . value ) ;
@@ -119,7 +129,7 @@ const FormTwoFa = ({authSessionId, companyLogin, userLogin, domain, twoFaProvide
119129 { ...field }
120130 fieldState = { fieldState }
121131 className = "mb-4"
122- label = { __ ( "Enter 2FA authentication code" , "simplybook" ) }
132+ label = { __ ( "Enter authentication code" , "simplybook" ) }
123133 setting = "two_fa_code"
124134 type = "text"
125135 placeholder = { __ ( "Enter code" , "simplybook" ) }
0 commit comments