Open utterances-bot opened 2 years ago
can't make this page work. All I get is an empty page with no error thrown
I currently face the same issue. When doing const [post] = useDocumentData(postRef); post returns undefined.
I Solved it. Check in firebase if the id of your post is same as the slug. It should be for example hello-world instead of hJyyEuKAVlg9TFVIVlGx
If any of you are getting the error " Type Error: path.split is not a function ". Then you must change the useForm register hook to the new updated verson. {...register("NAMEHERE")} instead of ref={register} <textarea {...register("content")}>
@marcelofrayha how you fixed it because i'm having the same issue
@bbissm can you explain a bit more I am facing the same issue and seem like I got my post id same as slug already but post still return 'undefined'
I am currently facing the same issue. The problem is useDocumentDataOnce function make the 'post' variable return 'undefined' Right now I still can't find the solution, but the quick-fix, as mention in https://github.com/CSFrequency/react-firebase-hooks/issues/252, is to use useDocumentData instead. Hope it help.
Post Editing Form
Use react-hook-forms to create a form to edit posts in markdown
https://fireship.io/courses/react-next-firebase/ssr-profile-page/