#TypeError: Cannot read properties of null (reading 'name')

16 messages · Page 1 of 1 (latest)

half snow
#

Hello, Im following the tutorial and Im in 4:02:01 part of it, I should be seeing the actual patient name but rather Im getting this error. How do I solve it?

half snow
#

Please help

true patrol
#

okay let me check your code

#

I just tried running your code, and I can see the patient name. There might be some incorrect data in your appwrite. I suggest deleting all appointments and creating a new one to see if the error still occurs

half snow
# true patrol I just tried running your code, and I can see the patient name. There might be s...

I had fixed it temporarly before to say Unknown if it is null and continued with the youtube tutorial the admin dashboard is complete now but It is not working, I tried creating new appointments but It still says the same error, aditionally the action buttons in the admin dashboard does not work too, and also in columns.tsx
<AppointmentModal
type="schedule"
// patientId={data.patient.$id}
userId={data.userId}
appointment={data}
/>
<AppointmentModal
type="cancel"
// patientId={data.patient.$id}
userId={data.userId}
appointment={data}
/>
these throw error so i commented them out,
I dont know what to do now, can you please fix it,

#

here is the new code in github

true patrol
#

Are you already delete all your appointment before create new one?

half snow
true patrol
#

Maybe you can try use my env, i will send it to your DM

half snow
#

ok

slate zephyr
#

any update possible solutions for this problem? i have the same issue

half snow
#

The problem is fixed

#

But now, Im getting an error with SMS

#

Can you please help me