when replying under reply my reply does'nt add to others
Let's fix this issue so that replies to replies are correctly added to the comment thread.
With these updates, you should now be able to reply to replies at any level, and the new replies will be correctly added to the comment thread. The changes maintain the existing structure and styling while fixing the functionality.
Is there anything else you'd like me to adjust or improve in this implementation?
Illegal return statement
I apologize for the error. Let's fix the illegal return statement in the handleAddReply function.
This updated version of handleAddReply fixes the illegal return statement by removing the extra curly braces that were causing the issue. The function now correctly updates the comment tree, allowing replies to be added at any level of nesting.
The changes made include:
setComments call is directly inside the handleAddReply function.These modifications should resolve the "Illegal return statement" error while maintaining the desired functionality of adding replies to comments at any level.
Is there anything else you'd like me to adjust or clarify in the implementation?
Illegal return statement