So I am building a project management web app with react and next js and using appwrite as my backend. I am getting an error in uploading comment to this database. I have put all the auth functionalities into a context hook so that I can extract them whenever I want to use them. Here is the auth context function, I use a custom hook for later usage.
I use a state variable to track the session and the current logged in users credentials. Later I extract it in other components so that I can get the user ID. I can get the user ID in the console but for some reason when I extract it in the code and pass it on as a schema to the DB it gives an error that the user ID is missing. Here are the images of the error and user ID in my code.
Now here is some more code. I also use a context hook based approach to pass on the functionalities of a database to child components whenever they need to. Then I extract the funcitionality and then try to pass it to the database like the code img given below.
Now here are some screenshots of the networks tab and the pattern of the collections in the DB.
I know this is a very long question but I have been dealing with this for the last two months, I even changed my tech stack because of this dumb error and it still does not go away
Recommended threads
- HUGE OUTRAGE IN APPWRITE, I CANNOT ACCES...
I have 2k users trying to access, sending me messages. What am I supposed to do? Please solve this asap.
- All my apps are not opening now
All my apps are not opening now 200+ apps are not opening plz fast
- Failed to generate functions SSL
```appwrite-worker-certificates | Cannot renew domain (functions.domain.com) on attempt no. 9 certificate: Failed to verify domain DNS records. appwrite-worker...