adrianhajdin / healthcare

Build a healthcare platform that streamlines patient registration, appointment scheduling, and medical records, and learn to implement complex forms and SMS notifications.
https://jsmastery.pro
2.02k stars 508 forks source link

TypeError: Cannot read properties of undefined (reading 'toString') #15

Open abhisek-10109 opened 3 months ago

abhisek-10109 commented 3 months ago

their is a TypeError in code components\PasskeyModal.tsx (39:64) @ toString

this problem is arising in visual code : React Hook useEffect has missing dependencies: 'path' and 'router'. Either include them or remove the dependency array. in line 45

37 | 38 | if (path)

39 | if (accessKey === process.env.NEXT_PUBLIC_ADMIN_PASSKEY!.toString()) { | ^ 40 | setOpen(false); 41 | router.push("/admin"); 42 | } else { 43| setOpen(true); 44| } 45| } , [encryptedKey]);

theTechbug commented 2 months ago

I can fix this issue.