0

i am building MERN like app and using sanity as database

when i try to load all the data that is not in array form in database then it goes well but if i try to load data that is in array form i am unable to do it (comments data)

when i add a comment from the clientside it goes well and visible in the frontend side but the username is null even if i am login to the application

if i add the comment from server side and add the comment manually than also it is not visible

what are the issues in sanity's database or if i am doing something wrong in the client side

my GitHub code :- https://github.com/priyanshu740/PhotoWall

reference video from where i am learning :- https://www.youtube.com/watch?v=1RHDhtbqo94&t=14535s

priyanshu
  • 5
  • 4
  • It looks like your frontend folder is a nested repo, which is making it inaccessible. Please see [this answer](https://stackoverflow.com/a/62057615/11356202) for a resolution. Once that's done, we'll be able to see your front end code and what might be going wrong. – Geoff Ball Jan 27 '22 at 21:02
  • solve that issue..can you further look into it and see what is the problem in the code? @Geoff Ball – priyanshu Jan 28 '22 at 05:40
  • It looks like line 55 of PinDetails.js is throwing an error when you try to post a comment. I didn't go as far as implementing Google Authentication, but if `user` is undefined you'll get a TypeError. Perhaps you could use `_ref:user?.id` and/or set a fallback `_id` so that things will work until you can locate why `user` is undefined. – Geoff Ball Jan 29 '22 at 17:08

0 Answers0