Closed pythonnelson closed 2 months ago
Try putting 'use server' on patient.actions.ts file. It's not emphasize in the vid
Try putting 'use server' on patient.actions.ts file. It's not emphasize in the vid
Thanks mate, it worked now by creating the user .... but still having the undefined in the patientForm at:
const user = await createUser(userData)
Try putting 'use server' on patient.actions.ts file. It's not emphasize in the vid
Thanks mate, it worked now by creating the user .... but still having the undefined in the patientForm at:
const user = await createUser(userData)
Try to console log the the data you receiving. Check for spelling error. And mostly check for argument types you receving. You can get some error caused by type error
I think issue is in appwrite file for some reason process.env is not deconstructing the values correctly and you have to set endpoints manually. client.setEndpoint("https://cloud.appwrite.io/v1").setProject("here.setProject(%22here) project id").setKey("here api key.");
async function onSubmit(data: z.infer) {
setIsLoading(true);
}
When i try to submit the welcome form, i get undefined, the code is not reaching at the level to create the user. Hence i got an undefined in the log.
And also i got an invalid url, but when i log the environment variables, i noticed that they are being read in the project.
Further debugging, when i provide the environment variables (API_KEY, PROJECT_ID and ENDPOINT) directly in the filename.actions.ts file, the user i created but the the id of the user is undefined.