Skip to content

Commit d1775db

Browse files
fix: email type error (#1066)
Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
1 parent cf9d647 commit d1775db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nextjs/src/features/passkey/PassKeyAddDevice.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ import { Field, Form, Formik } from 'formik'
1515
import { AxiosResponse } from 'axios'
1616
import { Button } from '@/components/ui/button'
1717
import { Input } from '@/components/ui/input'
18-
import { RootState } from '@/lib/store'
1918
import { addPasskeyUserDetails } from '@/app/api/Fido'
2019
import { apiStatusCodes } from '@/config/CommonConstant'
2120
import { passwordEncryption } from '@/app/api/Auth'
22-
import { useSelector } from 'react-redux'
2321
import { useState } from 'react'
2422

2523
interface PasswordValue {
@@ -31,10 +29,12 @@ interface PasskeyAddDeviceProps {
3129
setOpenModel: (flag: boolean) => void
3230
closeModal: (flag: boolean) => void
3331
registerWithPasskey: (flag: boolean) => Promise<void>
32+
email: string | undefined
3433
}
3534

3635
export default function PasskeyAddDevice({
3736
openModal,
37+
email,
3838
setOpenModel,
3939
registerWithPasskey,
4040
}: PasskeyAddDeviceProps): React.JSX.Element {
@@ -43,7 +43,7 @@ export default function PasskeyAddDevice({
4343
const [nextStep, setNextStep] = useState(false)
4444
const [passwordVisible, setPasswordVisible] = useState(false)
4545

46-
const userEmail = useSelector((state: RootState) => state.profile.email)
46+
const userEmail = email
4747
const savePassword = async (values: PasswordValue): Promise<void> => {
4848
try {
4949
const payload = {

0 commit comments

Comments
 (0)