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
1.77k stars 418 forks source link

Infinite loading after filling homepage form! #1

Open ssaintx opened 2 months ago

ssaintx commented 2 months ago

hey, there is infinite loading after clicking submit button. i checked console, api's but where is a problem?

prtk2403 commented 2 months ago

image The document structure has "identificationDocumentId" missing

ssaintx commented 2 months ago

i figured out, where was a problem. I did not use "use server" at server actions and used "use client" on page. So i solved my problem.

Vinal-Vin commented 2 months ago

@ssaintx which page are you referring to? could you provide screenshot of the code if possible?

Vinal-Vin commented 2 months ago

I think the issue might be around the sdk client. client.setEndpoint(ENDPOINT!).setProject(PROJECT_ID!).setKey(API_KEY!); I hardcoded the string values and it worked.

but passing string values exposes the endpoint and secrets

ssaintx commented 2 months ago

@ssaintx which page are you referring to? could you provide screenshot of the code if possible?

i used "use client" in patient page and home page in the app folder. I used hook for making dynamic year which was my mistake. So i figured out the problem and created new component called "Year.tsx" and used it as client component. And just used in the copyright section just by calling Year component

As you can see it is very easy to use and obvious

VehanRajintha commented 2 months ago

i have this same issue how to solve it any simple way code: 400, type: 'document_invalid_structure', response: { message: 'Invalid document structure: Unknown attribute: "identificationDocumentId"', code: 400, type: 'document_invalid_structure', version: '1.5.7'

sujatagunale commented 2 months ago

@VehanRajintha, it seems that you're passing the wrong data to the document, or the document expects something different, and the data sent to it is different. Do verify (from field name spelling) if all the field data is passed when creating a new document in Appwrite DB

VehanRajintha commented 2 months ago

@VehanRajintha, it seems that you're passing the wrong data to the document, or the document expects something different, and the data sent to it is different. Do verify (from field name spelling) if all the field data is passed when creating a new document in Appwrite DB

i checked all of the things and spellings again and again but still it happen

sujatagunale commented 2 months ago

@VehanRajintha share your github repo link

aman-yadav-05 commented 1 month ago

I think the issue might be around the sdk client. client.setEndpoint(ENDPOINT!).setProject(PROJECT_ID!).setKey(API_KEY!); I hardcoded the string values and it worked.

but passing string values exposes the endpoint and secrets

it does solved my problems but have you found any alternatives yet? @Vinal-Vin

saurabhsinghpy commented 3 weeks ago

hey, there is infinite loading after clicking submit button. i checked console, api's but where is a problem?

promumyhero commented 2 weeks ago

iam still at this problem, infinite loading

Walterkibet04 commented 2 weeks ago

infinite loading when registering a patient