@@ -3,20 +3,11 @@ import { Button } from "./Button";
33import { Card } from "./Card" ;
44import { AddShareType , useCoreKit } from "../composibles/useCoreKit" ;
55import { BN } from "bn.js" ;
6- import { HiOutlineMail } from "react-icons/hi" ;
76import { COREKIT_STATUS } from "@web3auth/mpc-core-kit" ;
87import { useNavigate } from "react-router-dom" ;
9- import { ShareDescription } from "./types" ;
10- import { HiOutlineKey , HiOutlineLockOpen , HiOutlineDocumentDuplicate } from "react-icons/hi" ;
11-
12- const FACTOR_MAP : Record < string , { title : string ; icon ?: React . ReactNode } > = {
13- Authenticator : { title : "Authenticator" , icon : < HiOutlineLockOpen className = "text-app-gray-900 dark:text-app-white w-5 h-5" /> } ,
14- seedPhrase : { title : "Seed Phrase" , icon : < HiOutlineDocumentDuplicate className = "text-app-gray-900 dark:text-app-white w-5 h-5" /> } ,
15- tssSecurityQuestions : { title : "Password" , icon : < HiOutlineKey className = "text-app-gray-900 dark:text-app-white w-5 h-5" /> } ,
16- } ;
178
189const MfaCard : React . FC = ( ) => {
19- const { setAddShareType, coreKitInstance, setCoreKitStatus, shareDescriptions , existingModules, userInfo } = useCoreKit ( ) ;
10+ const { setAddShareType, coreKitInstance, setCoreKitStatus, existingModules } = useCoreKit ( ) ;
2011 const navigate = useNavigate ( ) ;
2112
2213 const addMfa = ( addShareType : AddShareType ) => {
@@ -78,41 +69,6 @@ const MfaCard: React.FC = () => {
7869 </ div >
7970
8071 < div className = "mt-4 mb-0 border-t border-app-gray-200 dark:border-app-gray-500" > </ div >
81- {
82- userInfo && (
83- < div className = "divide-y divide-app-gray-200 dark:divide-app-gray-500" >
84- < div className = "flex items-center py-4" >
85- < div className = "mr-2" >
86- { [ "email_passwordless" , "jwt" ] . includes ( userInfo . typeOfLogin ) ? (
87- < HiOutlineMail className = "text-app-gray-900 dark:text-app-white w-5 h-5" name = "mail-icon" height = { 20 } width = { 20 } />
88- ) : (
89- < img
90- className = "w-5 h-5"
91- src = { `https://images.web3auth.io/login-${ userInfo . typeOfLogin } -active.svg` }
92- alt = { `${ userInfo . typeOfLogin } icon` }
93- />
94- ) }
95- </ div >
96- < div >
97- < h4 className = "text-sm font-semibold text-app-gray-900 dark:text-app-white first-letter:capitalize" > { userInfo . typeOfLogin } </ h4 >
98- < p className = "text-xs text-app-gray-400" > { userInfo . verifierId } </ p >
99- </ div >
100- </ div >
101- { shareDescriptions && shareDescriptions . length > 0 && shareDescriptions . map ( ( shareDescription : ShareDescription ) => (
102- < div key = { shareDescription . module } className = "flex items-center py-4" >
103- < div className = "mr-2" >
104- { /* <Icon name={shareDetail.icon || "key-icon"} className="text-app-gray-900 dark:text-app-white w-5 h-5" /> */ }
105- { FACTOR_MAP [ shareDescription . module ] . icon }
106- </ div >
107- < div >
108- < h4 className = "text-sm font-semibold text-app-gray-900 dark:text-app-white" > { FACTOR_MAP [ shareDescription . module ] . title } </ h4 >
109- < p className = "text-xs text-app-gray-400" > { new Date ( shareDescription . dateAdded ) . toLocaleString ( ) } </ p >
110- </ div >
111- </ div >
112- ) ) }
113- </ div >
114- )
115- }
11672 </ Card >
11773 ) ;
11874} ;
0 commit comments